From 1f92a04cd2b1290cec57d58ba66f2982756788fe Mon Sep 17 00:00:00 2001 From: "Stephen M. Coakley" Date: Sun, 3 May 2020 11:43:10 -0500 Subject: [PATCH] Fix code coverage runs (#183) `-Zno-landing-pads` was removed from nightly recently (https://github.com/rust-lang/rust/pull/70175), which seems to mess up grcov reports (https://github.com/mozilla/grcov/issues/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. --- .github/workflows/ci.yml | 25 ++++++------------------- .gitignore | 3 +++ 2 files changed, 9 insertions(+), 19 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index e91b4dff..08901a33 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -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 diff --git a/.gitignore b/.gitignore index 615fcc46..18546bbf 100644 --- a/.gitignore +++ b/.gitignore @@ -2,3 +2,6 @@ target Cargo.lock *.code-workspace + +# Code coverage reports +cobertura.xml