name: checks
# Reusable check matrix: fmt, clippy, test across the workspace. Called by
# `ci.yml` (push / PR) and by `release.yml` as a publish gate, so the exact
# commit that ships is the exact commit these checks passed on.
on:
workflow_call:
permissions:
contents: read
jobs:
rust:
name: fmt + clippy + test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- uses: dtolnay/rust-toolchain@stable
with:
components: clippy, rustfmt
- uses: Swatinem/rust-cache@v2
- run: cargo fmt --all --check
- run: cargo clippy --workspace --all-targets --all-features -- -D warnings
- run: cargo test --workspace --all-features