-
Notifications
You must be signed in to change notification settings - Fork 100
48 lines (45 loc) · 1.12 KB
/
coverage.yml
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
name: Test Coverage
on:
pull_request:
branches:
- master
push:
branches:
- master
jobs:
test:
name: Measure Test Coverage
runs-on: ubuntu-latest
steps:
- name: Checkout Polaris
uses: actions/checkout@v4
- uses: actions-rust-lang/setup-rust-toolchain@v1
with:
components: llvm-tools-preview
- name: Install grcov
run: cargo install grcov
- name: Run tests
run: cargo test --no-fail-fast
env:
RUSTFLAGS: "-Cinstrument-coverage"
- name: Gather coverage results
run: >
grcov
.
-t lcov
-o coverage.txt
--llvm
--branch
--ignore-not-existing
--binary-path ./target/debug/
--excl-line "#\[derive\("
--excl-br-line "#\[derive\("
--excl-start "mod tests \{"
--excl-br-start "mod tests \{"
- name: Upload Results
uses: codecov/codecov-action@v2
with:
fail_ci_if_error: true
verbose: true
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}