From a966661d9718f6d3812d554b7c1f4340ff3fdabf Mon Sep 17 00:00:00 2001 From: "Peter M. Stahl" Date: Mon, 19 Feb 2024 22:30:27 +0100 Subject: [PATCH] Fix coverage report job --- .github/workflows/rust-build.yml | 31 ++++++++++++++++++++----------- 1 file changed, 20 insertions(+), 11 deletions(-) diff --git a/.github/workflows/rust-build.yml b/.github/workflows/rust-build.yml index d396288..a9d099e 100644 --- a/.github/workflows/rust-build.yml +++ b/.github/workflows/rust-build.yml @@ -120,16 +120,25 @@ jobs: if: ${{ matrix.os == 'macos-latest' }} run: wasm-pack test --headless --safari -- --no-default-features - - 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: '--ignore-config --ignore-panics --ignore-tests --exclude-files src/main.rs src/wasm.rs' - timeout: 900 # increase timeout for long-running property tests + 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 - - name: Upload code coverage report to Codecov - if: ${{ matrix.os == 'ubuntu-latest' && github.event_name == 'push' }} + 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/main.rs src/wasm.rs --verbose --timeout 900 --out xml + + - name: Upload coverage report uses: codecov/codecov-action@v4 + with: + token: ${{ secrets.CODECOV_TOKEN }}