From 50a732db30117a7a1415542e155c50f1d00c1cb8 Mon Sep 17 00:00:00 2001 From: "Peter M. Stahl" Date: Thu, 7 Dec 2023 10:43:56 +0100 Subject: [PATCH] Fix code coverage report in workflow --- .github/workflows/rust-build.yml | 28 ++++++++++++++++++---------- 1 file changed, 18 insertions(+), 10 deletions(-) diff --git a/.github/workflows/rust-build.yml b/.github/workflows/rust-build.yml index e4479166..b078c905 100644 --- a/.github/workflows/rust-build.yml +++ b/.github/workflows/rust-build.yml @@ -103,15 +103,23 @@ jobs: if: ${{ matrix.os == 'macos-latest' }} run: wasm-pack test --headless --safari - - name: Create code coverage report - if: ${{ matrix.os == 'ubuntu-latest' && github.event_name == 'push' }} - # NOTE: actions-rs is unmaintained, using fork with fix for update to node 16 - # https://github.com/actions-rs/tarpaulin/pull/22 - uses: FreeMasen/tarpaulin-action@9f7e03f06fea8f374c85a95c2ecff6a4d5805845 - with: - version: "0.22.0" - args: '--lib --ignore-config --ignore-panics --ignore-tests --exclude-files src/script.rs src/wasm.rs src/bin/accuracy_reports.rs' + coverage-report: + name: Coverage Report + needs: rust-build + if: ${{ github.event_name == 'push' }} + + runs-on: ubuntu-latest + + container: + image: xd009642/tarpaulin:develop-nightly + options: --security-opt seccomp=unconfined + + steps: + - name: Check out repository + uses: actions/checkout@v4 + + - name: Generate coverage report + run: cargo +nightly tarpaulin --lib --ignore-config --ignore-panics --ignore-tests --exclude-files src/python.rs src/script.rs src/wasm.rs src/bin/accuracy_reports.rs --verbose --timeout 120 --out xml - - name: Upload code coverage report to Codecov - if: ${{ matrix.os == 'ubuntu-latest' && github.event_name == 'push' }} + - name: Upload coverage report uses: codecov/codecov-action@v3