build(deps): Bump the rust-dependencies group with 9 updates (#333) #207
This file contains 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: "Rust CI" | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
jobs: | |
lint: | |
uses: darbiadev/.github/.github/workflows/rust-lint.yaml@ea97d99e1520c46080c4c9032a69552e491474ac # v13.0.0 | |
clippy: | |
needs: lint | |
uses: darbiadev/.github/.github/workflows/rust-clippy.yaml@ea97d99e1520c46080c4c9032a69552e491474ac # v13.0.0 | |
test: | |
needs: clippy | |
strategy: | |
matrix: | |
triple: | |
- { os: "ubuntu-latest", target: "x86_64-unknown-linux-gnu" } | |
uses: darbiadev/.github/.github/workflows/rust-test.yaml@ea97d99e1520c46080c4c9032a69552e491474ac # v13.0.0 | |
with: | |
os: ${{ matrix.triple.os }} | |
target: ${{ matrix.triple.target }} | |
docs: | |
permissions: | |
contents: read | |
pages: write | |
id-token: write | |
uses: darbiadev/.github/.github/workflows/github-pages-rust-doc.yaml@ea97d99e1520c46080c4c9032a69552e491474ac # v13.0.0 | |
coverage: | |
runs-on: ubuntu-latest | |
steps: | |
- name: "Checkout repo" | |
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 | |
- name: "Cache Rust and project dependencies" | |
id: cache | |
uses: actions/cache@13aacd865c20de90d75de3b17ebe84f7a17d57d2 # v4.0.0 | |
with: | |
path: | | |
~/.cargo/bin/ | |
~/.cargo/registry/index/ | |
~/.cargo/registry/cache/ | |
~/.cargo/git/db/ | |
key: cargo-${{ hashFiles('Cargo.lock') }} | |
- name: "Install grcov" | |
if: steps.cache.outputs.cache-hit != 'true' | |
run: cargo install grcov | |
- name: "Run tests" | |
run: cargo test --no-fail-fast | |
env: | |
RUSTFLAGS: "-Cinstrument-coverage" | |
LLVM_PROFILE_FILE: "selene-%p-%m.profraw" | |
- name: "Generate coverage data" | |
run: | | |
grcov . -s . --binary-path ./target/debug/ -t lcov --branch --ignore-not-existing --ignore "/*" -o lcov.info | |
- name: "Upload coverage reports to Codecov" | |
uses: codecov/codecov-action@f30e4959ba63075080d4f7f90cacc18d9f3fafd7 # v4.0.0 | |
env: | |
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} |