Branch Coverage (nightly) #99
This file contains hidden or 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: Branch Coverage (nightly) | |
| on: | |
| schedule: | |
| - cron: "0 3 * * *" | |
| workflow_dispatch: | |
| permissions: | |
| contents: read | |
| jobs: | |
| llvm-cov: | |
| name: cargo-llvm-cov branch coverage | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Install Rust toolchain | |
| uses: dtolnay/rust-toolchain@nightly | |
| with: | |
| components: llvm-tools-preview | |
| - name: Install cargo-llvm-cov | |
| uses: taiki-e/install-action@cargo-llvm-cov | |
| - name: Generate branch coverage report | |
| run: cargo llvm-cov --branch --lcov --output-path lcov.info | |
| - name: Upload branch coverage to Codecov | |
| uses: codecov/codecov-action@v7 | |
| with: | |
| token: ${{ secrets.CODECOV_TOKEN }} | |
| files: ./lcov.info | |
| flags: branch-coverage | |
| fail_ci_if_error: true | |
| - name: Generate HTML report | |
| run: cargo llvm-cov --branch --html | |
| - name: Upload HTML report as artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: llvm-cov-html | |
| path: target/llvm-cov/html/ | |
| retention-days: 30 |