name: Coverage
"on":
push:
branches: [main]
pull_request:
branches: [main]
permissions:
contents: read
concurrency:
group: ${{ github.workflow }}-${{ github.ref == 'refs/heads/main' && github.run_id || github.ref }}
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }}
env:
CARGO_TERM_COLOR: always
jobs:
coverage:
name: Code Coverage
runs-on: ubuntu-26.04
timeout-minutes: 45
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 with:
persist-credentials: false
- uses: dtolnay/rust-toolchain@2c76c034f9e32a5d6e2c104dc4df23a22476db04 with:
components: llvm-tools-preview
- uses: taiki-e/install-action@c509219cf42fba86913069efd0ade2458c59337b with:
tool: cargo-llvm-cov
- uses: Swatinem/rust-cache@d1527c8f67ef9af357290475d4af4b0fab8f12e0 - run: mkdir -p target/coverage
- run: cargo llvm-cov --all-features --all-targets --branch --no-report
- run: >-
cargo llvm-cov --all-features --doc --branch --no-clean
--lcov --output-path target/coverage/lcov.info
- uses: codecov/codecov-action@303a32d7a59b442fa8d48b6a1cc6825c09c847a5 with:
files: target/coverage/lcov.info
fail_ci_if_error: false
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}