Skip to content

Commit

Permalink
Fix code coverage runs (#183)
Browse files Browse the repository at this point in the history
`-Zno-landing-pads` was removed from nightly recently (rust-lang/rust#70175), which seems to mess up grcov reports (mozilla/grcov#427). Even after figuring out how to set `panic=abort` on all the correct profiles, it seems that it still reports odd numbers relative to when `-Zno-landing-pads` worked.

Switch to [tarpaulin](https://github.com/xd009642/tarpaulin) for now which has also caught my eye recently.
  • Loading branch information
sagebind authored May 3, 2020
1 parent 1471674 commit 1f92a04
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 19 deletions.
25 changes: 6 additions & 19 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,26 +43,13 @@ jobs:
with:
submodules: true

- uses: actions-rs/toolchain@v1
with:
toolchain: nightly
override: true

- uses: actions-rs/cargo@v1
- name: Generate code coverage report
uses: actions-rs/tarpaulin@v0.1
with:
command: test
args: --features cookies,psl --no-fail-fast
env:
CARGO_INCREMENTAL: '0'
RUSTFLAGS: '-Zprofile -Ccodegen-units=1 -Cinline-threshold=0 -Clink-dead-code -Coverflow-checks=off -Zno-landing-pads'

- name: Install grcov
run: |
curl -LSs https://github.com/mozilla/grcov/releases/download/v0.5.9/grcov-linux-x86_64.tar.bz2 | sudo tar xjf - -C /usr/local/bin
- uses: actions-rs/grcov@v0.1
args: "--features cookies,psl"

- uses: codecov/codecov-action@v1
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v1
with:
token: ${{ secrets.CODECOV_TOKEN }}
file: ./lcov.info
fail_ci_if_error: true
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,6 @@
target
Cargo.lock
*.code-workspace

# Code coverage reports
cobertura.xml

0 comments on commit 1f92a04

Please sign in to comment.