-
Notifications
You must be signed in to change notification settings - Fork 0
79 lines (65 loc) · 2.03 KB
/
Copy pathci.yml
File metadata and controls
79 lines (65 loc) · 2.03 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
name: CI
on:
push:
branches: [main]
pull_request:
permissions:
contents: read
jobs:
check:
name: Check & Test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: oven-sh/setup-bun@v2
with:
bun-version: latest
- name: Install dependencies
run: bun install --frozen-lockfile
- name: Type check
run: bun run check
- name: Test
run: bun test
- name: Coverage
run: bun run coverage
- name: Coverage summary
if: always()
run: |
env -u BRAINCODE_DEBUG -u BRAINCODE_DEBUG_FILE \
bun test --coverage --coverage-reporter=text > coverage-text.log 2>&1 || true
{
echo "### Coverage"
echo '```'
grep -E '^(-|[ ]*File|packages/|apps/|All files)' coverage-text.log || true
echo '```'
} >> "$GITHUB_STEP_SUMMARY"
- name: Prepare report directory
run: mkdir -p benchmarks/reports
- name: Planning benchmark
run: |
bun run braincode -- benchmark --heuristic --json > benchmarks/reports/planning-benchmark.json
{
echo "### Planning benchmark (heuristic)"
echo '```'
bun run braincode -- benchmark --heuristic
echo '```'
} >> "$GITHUB_STEP_SUMMARY"
- name: Execution benchmark
run: |
bun run braincode -- benchmark --execute --task login-validation --json > benchmarks/reports/execution-benchmark.json
{
echo "### Execution benchmark (login-validation)"
echo '```'
bun run braincode -- benchmark --execute --task login-validation
echo '```'
} >> "$GITHUB_STEP_SUMMARY"
- name: Upload reports
if: always()
uses: actions/upload-artifact@v4
with:
name: ci-reports
path: |
benchmarks/reports/*.json
coverage/lcov.info
if-no-files-found: warn
retention-days: 7