Skip to content

Commit

Permalink
Fix coverage report job
Browse files Browse the repository at this point in the history
  • Loading branch information
pemistahl committed Feb 19, 2024
1 parent 4d1025e commit a966661
Showing 1 changed file with 20 additions and 11 deletions.
31 changes: 20 additions & 11 deletions .github/workflows/rust-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}

0 comments on commit a966661

Please sign in to comment.