Merge pull request #581 from mgeisler/cache-coverage-build #276
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: coverage | |
on: | |
push: | |
branches: | |
- master | |
env: | |
CARGO_TERM_COLOR: always | |
jobs: | |
coverage: | |
name: Generate coverage | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
features: | |
- no-default-features | |
- all-features | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- uses: Swatinem/rust-cache@v2 | |
- name: Install cargo-llvm-cov | |
uses: taiki-e/install-action@cargo-llvm-cov | |
- name: Run tests with Coverage report enabled | |
run: cargo llvm-cov test --${{ matrix.features }} --codecov --locked --output-path codecov_report.json | |
- name: Upload coverage report to Codecov | |
uses: codecov/codecov-action@v5 | |
with: | |
token: ${{ secrets.CODECOV_TOKEN }} | |
files: ./codecov_report.json |