File tree Expand file tree Collapse file tree 1 file changed +41
-0
lines changed
Expand file tree Collapse file tree 1 file changed +41
-0
lines changed Original file line number Diff line number Diff line change 1+ name : Code Coverage
2+ on :
3+ push :
4+ branches : [ "main" ]
5+ paths :
6+ - .github/workflows/*
7+ - src/**
8+ - build.zig
9+ - build.zig.zon
10+ jobs :
11+ coverage :
12+ if : github.repository_owner == 'zigtools'
13+ runs-on : ubuntu-latest
14+
15+ steps :
16+ - name : ⬇️ Checkout
17+ uses : actions/checkout@v4
18+
19+ - name : (Z) Install Zig
20+ uses : goto-bus-stop/setup-zig@v2
21+ with :
22+ version : master
23+
24+ - run : zig env
25+
26+ - name : Install kcov
27+ run : |
28+ wget https://github.com/SimonKagstrom/kcov/releases/download/v42/kcov-amd64.tar.gz
29+ sudo tar xf kcov-amd64.tar.gz -C /
30+
31+ - name : Run Tests with kcov
32+ run : |
33+ kcov --version
34+ zig build test -Dcoverage --summary all
35+
36+ - name : Upload to Codecov
37+ uses : codecov/codecov-action@v5
38+ with :
39+ directory : zig-out/coverage/kcov-merged
40+ fail_ci_if_error : true
41+ verbose : true
You can’t perform that action at this time.
0 commit comments