Bump the rust-dependencies group across 1 directory with 3 updates #143
Workflow file for this run
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: Code Coverage | |
| on: | |
| push: | |
| branches: [main] | |
| pull_request: | |
| branches: [main] | |
| env: | |
| CARGO_TERM_COLOR: always | |
| CARGO_INCREMENTAL: 0 | |
| CARGO_PROFILE_TEST_DEBUG: 0 | |
| CARGO_PROFILE_RELEASE_LTO: true | |
| CARGO_PROFILE_RELEASE_CODEGEN_UNITS: 1 | |
| PKG_CONFIG_PATH: /usr/lib/x86_64-linux-gnu/pkgconfig | |
| permissions: | |
| contents: read | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| coverage: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v6 | |
| - name: Install system dependencies | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y pkg-config libasound2-dev | |
| pkg-config --libs --cflags alsa | |
| - name: Install Rust toolchain | |
| run: rustup toolchain install stable | |
| - name: Cache Rust dependencies | |
| uses: Swatinem/rust-cache@v2 | |
| with: | |
| cache-all-crates: true | |
| - name: Build and test | |
| run: cargo test --workspace --all-targets | |
| - name: Install grcov | |
| run: cargo install grcov | |
| - name: Generate code coverage | |
| env: | |
| CARGO_INCREMENTAL: "0" | |
| RUSTFLAGS: "-Cinstrument-coverage" | |
| RUSTDOCFLAGS: "-Cinstrument-coverage" | |
| LLVM_PROFILE_FILE: "coverage-%p-%m.profraw" | |
| run: | | |
| cargo test --workspace --all-targets | |
| grcov . \ | |
| --binary-path ./target/debug/ \ | |
| -s . \ | |
| -t cobertura \ | |
| --branch \ | |
| --ignore-not-existing \ | |
| --ignore "/*" \ | |
| -o coverage.xml | |
| - name: Upload coverage to Codecov | |
| uses: codecov/codecov-action@v6 | |
| with: | |
| token: ${{ secrets.CODECOV_TOKEN }} | |
| slug: stacksjb/Shell_Command_Menu | |
| files: coverage.xml | |
| fail_ci_if_error: true |