-
-
Notifications
You must be signed in to change notification settings - Fork 422
42 lines (35 loc) · 1.2 KB
/
coverage.yml
File metadata and controls
42 lines (35 loc) · 1.2 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
name: Code Coverage
on:
push:
branches:
- master
pull_request:
jobs:
coverage:
if: github.repository_owner == 'zigtools'
runs-on: ubuntu-22.04
timeout-minutes: 10
steps:
- uses: actions/checkout@v4
- uses: mlugg/setup-zig@v2
with:
version: master
- name: prefetch dependencies (workaround)
run: |
zig fetch https://github.com/ziglibs/known-folders/archive/bafef170a73c064dc706fcfbdc2e406a35681a9c.tar.gz
zig fetch https://github.com/ziglibs/diffz/archive/36fc805f459677093c93c210e8f9aed28be13847.tar.gz
zig fetch https://github.com/zigtools/lsp-kit/archive/c46ac866dda11ab58e4ba71ed0d8ba21f43e81db.tar.gz
- name: Install kcov
run: |
wget https://github.com/SimonKagstrom/kcov/releases/download/v42/kcov-amd64.tar.gz
sudo tar xf kcov-amd64.tar.gz -C /
- name: Run Tests with kcov
run: |
kcov --version
zig build test -Dcoverage -Duse-llvm --summary all
- name: Upload to Codecov
uses: codecov/codecov-action@v5
with:
directory: zig-out/coverage/kcov-merged
fail_ci_if_error: true
verbose: true