From 802927b7a6325489983b10db131f1a01aabda394 Mon Sep 17 00:00:00 2001 From: Sascha Grunert Date: Mon, 7 Mar 2022 09:40:26 +0100 Subject: [PATCH] Fix codecov workflow Signed-off-by: Sascha Grunert --- .github/grcov.yml | 7 +++++++ .github/workflows/test.yml | 30 ++++++++++++++++++------------ 2 files changed, 25 insertions(+), 12 deletions(-) create mode 100644 .github/grcov.yml diff --git a/.github/grcov.yml b/.github/grcov.yml new file mode 100644 index 0000000..018c79c --- /dev/null +++ b/.github/grcov.yml @@ -0,0 +1,7 @@ +branch: true +ignore-not-existing: true +llvm: true +filter: covered +output-type: lcov +output-path: ./lcov.info +prefix-dir: /home/user/build/ diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 0355f2b..954865b 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -88,20 +88,26 @@ jobs: - uses: actions/checkout@v2 - uses: actions-rs/toolchain@v1 with: - toolchain: stable + toolchain: nightly override: true - - name: Run cargo-tarpaulin - uses: actions-rs/tarpaulin@v0.1 - with: - version: '0.15.0' - args: '-- --test-threads 1' + - name: Install rustfmt + shell: bash + run: rustup component add rustfmt + - name: Unit tests + uses: actions-rs/cargo@v1 + with: + command: test + args: --bins --no-fail-fast + env: + CARGO_INCREMENTAL: '0' + RUSTFLAGS: '-Zprofile -Ccodegen-units=1 -Cinline-threshold=0 -Clink-dead-code -Coverflow-checks=off -Zpanic_abort_tests' + RUSTDOCFLAGS: '-Zprofile -Ccodegen-units=1 -Cinline-threshold=0 -Clink-dead-code -Coverflow-checks=off -Zpanic_abort_tests' + - name: Coverage + uses: actions-rs/grcov@v0.1 + with: + config: .github/grcov.yml - name: Upload to codecov.io - uses: codecov/codecov-action@v1.4.1 - - name: Archive code coverage results - uses: actions/upload-artifact@v1 - with: - name: code-coverage-report - path: cobertura.xml + uses: codecov/codecov-action@v2 doc: runs-on: ubuntu-latest