-
Notifications
You must be signed in to change notification settings - Fork 1
47 lines (37 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
name: Code Coverage
on:
push:
branches: [ "main", "development" ]
pull_request:
branches: [ "main", "development" ]
env:
CARGO_TERM_COLOR: always
jobs:
coverage:
name: nps code coverage - latest
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Install nix
uses: cachix/install-nix-action@v27
- name: Set up nix
run: |
nix build
nix flake check
- name: Setting up channels
run: |
nix-channel --add https://nixos.org/channels/nixos-unstable nixos
nix-channel --update
- name: Install Rust
run: rustup update stable
- name: Install tarpaulin
run: cargo install cargo-tarpaulin
- name: Generate code coverage
run: |
RUST_LOG=TRACE cargo-tarpaulin --verbose --all-features --workspace --timeout 360 --out xml --follow-exec -- --include-ignored
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v5
with:
token: ${{ secrets.CODECOV_TOKEN }}
fail_ci_if_error: true