name: Coverage on: pull_request: push: branches: - main permissions: contents: read jobs: coverage: name: cargo llvm-cov + codecov runs-on: ubuntu-latest steps: - uses: actions/checkout@v7 - uses: dtolnay/rust-toolchain@1.88.0 with: components: llvm-tools-preview - uses: Swatinem/rust-cache@v2.9.1 - uses: taiki-e/install-action@cargo-llvm-cov - run: cargo llvm-cov --locked --workspace --all-targets --lcov --output-path lcov.info - name: Upload coverage reports to Codecov uses: codecov/codecov-action@v7 if: github.event_name == 'push' && github.ref == 'refs/heads/main' with: token: ${{ secrets.CODECOV_TOKEN }} files: lcov.info fail_ci_if_error: true