Skip to content

Commit

Permalink
Fix code coverage report in workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
pemistahl committed Dec 7, 2023
1 parent 72f2d89 commit 50a732d
Showing 1 changed file with 18 additions and 10 deletions.
28 changes: 18 additions & 10 deletions .github/workflows/rust-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit 50a732d

Please sign in to comment.