Tarpaulin -> grcov

This commit is contained in:
Antoine Gersant 2025-01-31 00:33:39 -08:00
parent 95c7d1a620
commit fd3f877f93

View file

@ -17,13 +17,31 @@ jobs:
- name: Checkout Polaris
uses: actions/checkout@v4
- uses: actions-rust-lang/setup-rust-toolchain@v1
- name: Run Tarpaulin
uses: actions-rs/tarpaulin@v0.1
with:
args: "--all-features --ignore-tests"
out-type: Xml
timeout: 240
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
--excl-line "#\[derive\("
--excl-br-line "#\[derive\("
--excl-start "mod tests \{"
--excl-br-start "mod tests \{"
working-directory: lib
- name: Upload Results
uses: codecov/codecov-action@v2
with:
fail_ci_if_error: true
verbose: true
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}