Merge pull request #3 from Q300Z/release-plz-2026-02-05T00-54-57Z #13
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: Rust CI | |
| on: | |
| push: | |
| branches: [ "main", "dev" ] | |
| pull_request: | |
| branches: [ "main", "dev" ] | |
| env: | |
| CARGO_TERM_COLOR: always | |
| jobs: | |
| # Check formatting | |
| fmt: | |
| name: Rustfmt | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: dtolnay/rust-toolchain@stable | |
| with: | |
| components: rustfmt | |
| - run: cargo fmt --all -- --check | |
| # Static analysis | |
| clippy: | |
| name: Clippy | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: dtolnay/rust-toolchain@stable | |
| with: | |
| components: clippy | |
| - uses: swatinem/rust-cache@v2 | |
| - name: Run clippy | |
| run: cargo clippy --all-targets --all-features -- -D warnings | |
| # Multi-feature testing matrix | |
| test: | |
| name: Test | |
| needs: [ fmt, clippy ] | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| feature_flags: [ "--all-features", "--no-default-features" ] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: dtolnay/rust-toolchain@stable | |
| - uses: swatinem/rust-cache@v2 | |
| - name: Run tests | |
| run: cargo test ${{ matrix.feature_flags }} --verbose | |
| # Ensure benchmarks still compile | |
| check-benches: | |
| name: Check Benchmarks | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: dtolnay/rust-toolchain@stable | |
| - uses: swatinem/rust-cache@v2 | |
| - name: Build benchmarks | |
| run: cargo check --benches --all-features |