-
-
Notifications
You must be signed in to change notification settings - Fork 1
43 lines (36 loc) · 1.21 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
---
name: Coverage
on:
workflow_call:
secrets:
CODECOV_TOKEN:
required: true
jobs:
coverage:
name: Coverage
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
with:
components: llvm-tools-preview
- name: Run tests
run: cargo test --verbose -- --nocapture
env:
RUST_BACKTRACE: full
CARGO_INCREMENTAL: 0
LLVM_PROFILE_FILE: coverage-%p-%m.profraw
RUSTFLAGS: -Cinstrument-coverage -Ccodegen-units=1 -Clink-dead-code -Coverflow-checks=off
RUSTDOCFLAGS: -Cinstrument-coverage -Ccodegen-units=1 -Clink-dead-code -Coverflow-checks=off
- name: Install grcov
run: if [[ ! -e ~/.cargo/bin/grcov ]]; then cargo install grcov; fi
- name: Run grcov
run: grcov . --binary-path target/debug/deps/ -s . -t lcov --branch --ignore-not-existing
--ignore '../**' --ignore '/*' -o coverage.lcov
- uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: ./coverage.lcov
flags: rust
- name: Coveralls GitHub Action
uses: coverallsapp/github-action@v2