name: CI on: push: branches: [main] pull_request: env: CARGO_TERM_COLOR: always jobs: test: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 # Pinned, and kept in step with `devVersion` in flake.nix, so CI and # the dev shell agree and a new stable release cannot turn a lint # failure into an unrelated red build. - uses: dtolnay/rust-toolchain@1.99.1 with: components: rustfmt, clippy - run: cargo build --all-targets - run: cargo test - run: cargo fmt --check - run: cargo clippy --all-targets -- -D warnings msrv: name: Build on the declared MSRV runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 # Must match `rust-version` in Cargo.toml and `msrvVersion` in # flake.nix. Builds only — lint and format output varies by release, # and pinning those to the oldest supported toolchain is not useful. - uses: dtolnay/rust-toolchain@1.88.0 - run: cargo test stable: name: Latest stable (advisory) runs-on: ubuntu-latest # Advisory only. The pinned `test` job is the gate; this one exists so # that a new stable release breaking the build or firing a new clippy # lint is visible before the pin moves, without failing a pull request # that did not cause it. Check it when bumping `devVersion`. continue-on-error: true steps: - uses: actions/checkout@v4 - uses: dtolnay/rust-toolchain@stable with: components: clippy - run: cargo test - run: cargo clippy --all-targets -- -D warnings