-
Notifications
You must be signed in to change notification settings - Fork 72
41 lines (34 loc) · 1.16 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
name: Code Coverage
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
coverage:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup toolchain
uses: dtolnay/rust-toolchain@nightly
with:
components: llvm-tools-preview
# - name: Install grcov
# run: curl -L https://github.com/mozilla/grcov/releases/latest/download/grcov-x86_64-unknown-linux-gnu.tar.bz2 | tar jxf -
# - name: Run tests
# run: cargo test
# env:
# RUSTFLAGS: "-Zinstrument-coverage"
# LLVM_PROFILE_FILE: "report-%p-%m.profraw"
# - name: Run grcov
# run: ./grcov $(find . -name "report-*.profraw" -print) -s . --binary-path ./target/debug/ -t lcov --branch --ignore-not-existing --ignore "src/cli/*" -o coverage.lcov
- name: Install cargo-llvm-cov
uses: taiki-e/install-action@cargo-llvm-cov
- name: Generate code coverage
run: cargo llvm-cov --ignore-filename-regex "src/cli/*" --lcov --output-path lcov.info
- name: Upload
uses: codecov/codecov-action@v3
with:
files: lcov.info