@@ -2,72 +2,63 @@ name: CI
22
33on :
44 push :
5- branches : [ main ]
5+ branches : [main]
66 pull_request :
7- branches : [ main ]
7+ branches : [main]
88
99jobs :
1010 test :
1111 runs-on : ubuntu-latest
12-
13- steps :
14- - name : Checkout
15- uses : actions/checkout@v4
1612
17- - name : Setup Zig 0.15.1
18- uses : goto-bus-stop/setup-zig@v2
19- with :
20- version : 0.15.1
13+ steps :
14+ - name : Checkout
15+ uses : actions/checkout@v4
2116
22- - name : Setup Bun 1.3
23- uses : oven-sh /setup-bun@v1
24- with :
25- bun- version : ' 1.3 '
17+ - name : Setup Zig 0.15.1
18+ uses : goto-bus-stop /setup-zig@v2
19+ with :
20+ version : 0.15.1
2621
27- - name : Cache Zig dependencies
28- uses : actions/cache@v4
29- with :
30- path : |
31- ~/.cache/zig
32- zig-cache
33- key : ${{ runner.os }}-zig-${{ hashFiles('build.zig.zon') }}
34- restore-keys : |
35- ${{ runner.os }}-zig-
22+ - name : Setup Bun 1.3
23+ uses : oven-sh/setup-bun@v1
24+ with :
25+ bun-version : " 1.3"
3626
37- - name : Cache Bun dependencies
38- uses : actions/cache@v4
39- with :
40- path : |
41- tests/node_modules
42- ~/.bun/install/ cache
43- key : ${{ runner.os }}-bun -${{ hashFiles('tests/package.json ') }}
44- restore-keys : |
45- ${{ runner.os }}-bun -
27+ - name : Cache Zig dependencies
28+ uses : actions/cache@v4
29+ with :
30+ path : |
31+ ~/.cache/zig
32+ zig- cache
33+ key : ${{ runner.os }}-zig -${{ hashFiles('build.zig.zon ') }}
34+ restore-keys : |
35+ ${{ runner.os }}-zig -
4636
47- - name : Install Node.js dependencies
48- run : bun install
49- working-directory : tests
37+ - name : Cache Bun dependencies
38+ uses : actions/cache@v4
39+ with :
40+ path : |
41+ tests/node_modules
42+ ~/.bun/install/cache
43+ key : ${{ runner.os }}-bun-${{ hashFiles('tests/package.json') }}
44+ restore-keys : |
45+ ${{ runner.os }}-bun-
5046
51- - name : Build Zig project
52- run : zig build
47+ - name : Install Node.js dependencies
48+ run : bun install
49+ working-directory : tests
5350
54- - name : Run tests
55- run : bun test --reporter=junit --reporter-outfile=test-results.xml
56- working-directory : tests
51+ - name : Build Zig project
52+ run : zig build
5753
58- - name : Upload test results
59- uses : actions/upload-artifact@v4
60- if : always()
61- with :
62- name : test-results
63- path : tests/test-results.xml
64- retention-days : 30
54+ - name : Run tests
55+ run : bun test --reporter=junit --reporter-outfile=test-results.xml
56+ working-directory : tests
6557
66- - name : Publish test results
67- uses : dorny/test-reporter@v2
68- if : always()
69- with :
70- name : ' Test Results'
71- path : ' tests/test-results.xml'
72- reporter : ' java-junit'
73- fail-on-error : true
58+ - name : Upload test results
59+ uses : actions/upload-artifact@v4
60+ if : always()
61+ with :
62+ name : test-results
63+ path : tests/test-results.xml
64+ retention-days : 30
0 commit comments