chore(deps): bump codecov/codecov-action from 5 to 6 #53
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: Coverage | |
| on: | |
| push: | |
| branches: [ main ] | |
| pull_request: | |
| branches: [ main ] | |
| env: | |
| CARGO_TERM_COLOR: always | |
| jobs: | |
| coverage: | |
| name: Code Coverage | |
| if: github.event.pull_request.draft == false | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - name: Install LLVM 18 | |
| run: | | |
| wget https://apt.llvm.org/llvm.sh | |
| chmod +x llvm.sh | |
| sudo ./llvm.sh 18 | |
| sudo apt-get install -y llvm-18-dev libclang-18-dev libpolly-18-dev | |
| echo "LLVM_SYS_180_PREFIX=/usr/lib/llvm-18" >> $GITHUB_ENV | |
| - name: Install Rust | |
| uses: dtolnay/rust-toolchain@stable | |
| with: | |
| components: llvm-tools-preview | |
| - name: Cache cargo registry | |
| uses: actions/cache@v4 | |
| with: | |
| path: ~/.cargo/registry | |
| key: ${{ runner.os }}-cargo-registry-${{ hashFiles('**/Cargo.lock') }} | |
| - name: Cache cargo index | |
| uses: actions/cache@v4 | |
| with: | |
| path: ~/.cargo/git | |
| key: ${{ runner.os }}-cargo-index-${{ hashFiles('**/Cargo.lock') }} | |
| - name: Install grcov | |
| run: cargo install grcov | |
| - name: Build | |
| run: cargo build | |
| env: | |
| RUSTFLAGS: '-Cinstrument-coverage' | |
| LLVM_PROFILE_FILE: 'codecov-instrumentation-%p-%m.profraw' | |
| - name: Run tests | |
| run: cargo test | |
| env: | |
| RUSTFLAGS: '-Cinstrument-coverage' | |
| LLVM_PROFILE_FILE: 'codecov-instrumentation-%p-%m.profraw' | |
| - name: Generate coverage report | |
| run: | | |
| grcov . \ | |
| --binary-path ./target/debug/ \ | |
| --source-dir . \ | |
| --output-type lcov \ | |
| --branch \ | |
| --ignore-not-existing \ | |
| --ignore "/*" \ | |
| --ignore "target/*" \ | |
| --ignore "tests/*" \ | |
| --output-path coverage.lcov | |
| - name: Upload coverage to Codecov | |
| uses: codecov/codecov-action@v6 | |
| with: | |
| file: coverage.lcov | |
| flags: unittests | |
| name: codecov-umbrella | |
| fail_ci_if_error: false |