-
-
Notifications
You must be signed in to change notification settings - Fork 311
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
coverage: add coverage CI action (#1343)
- Loading branch information
1 parent
209d8c4
commit 8d162d3
Showing
2 changed files
with
42 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
name: Code Coverage | ||
|
||
on: [push, pull_request] | ||
|
||
jobs: | ||
coverage: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 | ||
submodules: true | ||
|
||
- uses: goto-bus-stop/setup-zig@v2 | ||
with: | ||
version: master | ||
|
||
- run: zig version | ||
- run: zig env | ||
|
||
- name: Build | ||
run: zig build | ||
|
||
- 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 -Dgenerate_coverage | ||
- name: Upload to Codecov | ||
uses: codecov/codecov-action@v3 | ||
with: | ||
token: ${{ secrets.CODECOV_TOKEN }} | ||
directory: zig-out/kcov/kcov-merged | ||
fail_ci_if_error: true | ||
verbose: true | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
comment: |