-
-
Notifications
You must be signed in to change notification settings - Fork 18
35 lines (32 loc) · 1.04 KB
/
codecov.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
name: Codecov
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
env:
CARGO_TERM_COLOR: always
jobs:
codecov:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install Nix
uses: cachix/install-nix-action@v26
- name: Build
run: nix develop .#codecov -c cargo build --release
- name: Test
run: nix develop .#codecov -c cargo test --all-features --no-fail-fast --tests
- name: Install grcov
run: nix develop .#codecov -c cargo install grcov
- name: Generate coverage
run: nix develop .#codecov -c grcov . --binary-path target/debug/deps/ -s . -t lcov --branch --ignore-not-existing --ignore '../**' --ignore '/*' -o coverage.lcov
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v4
with:
files: ./coverage.lcov
flags: rust
# TODO: set true when CODECOV_TOKEN is set
fail_ci_if_error: false
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}