Skip to content

Commit

Permalink
github: run tests when collecting coverage
Browse files Browse the repository at this point in the history
  • Loading branch information
vrutkovs committed Dec 24, 2024
1 parent c3e82c9 commit 715c938
Showing 1 changed file with 13 additions and 10 deletions.
23 changes: 13 additions & 10 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -74,22 +74,25 @@ jobs:
tool: cargo-tarpaulin
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Generate test result and coverage report
run: |
cargo install cargo2junit;
cargo build --verbose;
cargo test $CARGO_OPTIONS -- -Z unstable-options --format json | cargo2junit > results.xml;
- name: Run cargo-tarpaulin
uses: clechasseur/rs-cargo@v2
with:
command: tarpaulin
args: -- -Z unstable-options --format=json > report.json
- name: Install cargo2junit
uses: taiki-e/install-action@v2
with:
tool: cargo2junit
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Build junit xml
run: cargo2junit > results.xml
- name: Upload test results
uses: EnricoMi/publish-unit-test-result-action@v2
with:
check_name: Test Results
github_token: ${{ secrets.GITHUB_TOKEN }}
files: results.xml
- name: Run cargo-tarpaulin
uses: clechasseur/rs-cargo@v2
with:
command: tarpaulin
args: --skip-clean
- name: Upload to CodeCov
uses: codecov/codecov-action@v5
with:
Expand Down

0 comments on commit 715c938

Please sign in to comment.