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 Oct 1, 2022
1 parent 77c709f commit d1e854e
Showing 1 changed file with 5 additions and 10 deletions.
15 changes: 5 additions & 10 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,19 +46,14 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true
- uses: actions-rs/[email protected]
with:
version: latest
out-type: Xml
args: '--features=serde,num-v04 --no-default-features'
- name: Install cargo-llvm-cov
uses: taiki-e/install-action@cargo-llvm-cov
- name: Test and gather coverage
run: cargo llvm-cov --lcov --output-path lcov.info --features=serde,num-v04 --no-default-features
- 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 d1e854e

Please sign in to comment.