Skip to content

Commit

Permalink
Switch to using cargo llvm-cov for code coverage assessment
Browse files Browse the repository at this point in the history
Our code coverage collection runs have repeatedly failed because of a
what appears to be a bug in the actions-rs/tarpaulin implementation.
This action, it turns out, has actually been (soft?) deprecated [0].
Attempting to switch to installing cargo-tarpauling directly takes ages,
and we already know that we would rather avoid handling caching in
GitHub Actions, because of their API mess.
However, it appears as if cargo llvm-cov may be usable by now, and is
generally said to provide more accurate coverage information. Thus, with
this change we switch over to using it for collection of code coverage.
Note that cargo-tarpaulin also seems to support using LLVM coverage as a
backend, but it still suffers from the aforementioned issues.

[0] actions-rs/tarpaulin#6
  • Loading branch information
d-e-s-o committed Dec 25, 2022
1 parent b62835c commit 6112854
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,17 +30,17 @@ jobs:
name: Run tests
run: cargo test -- --include-ignored
- if: ${{ matrix.rust == 'stable' }}
name: Run tests
uses: actions-rs/tarpaulin@v0.1
with:
version: latest
args: -- --include-ignored
out-type: Xml
name: Install cargo-llvm-cov
uses: taiki-e/install-action@cargo-llvm-cov
- if: ${{ matrix.rust == 'stable' }}
name: Test and gather coverage
run: cargo llvm-cov --lcov --output-path lcov.info -- --include-ignored
- if: ${{ matrix.rust == 'stable' }}
name: Upload code coverage results
uses: codecov/codecov-action@v3
with:
files: cobertura.xml
files: lcov.info

clippy:
name: Lint with clippy
runs-on: ubuntu-latest
Expand Down

0 comments on commit 6112854

Please sign in to comment.