name: CI on: push: branches: [main] pull_request: branches: [main] env: CARGO_TERM_COLOR: always RUST_BACKTRACE: 1 jobs: test: name: Test Suite (${{ matrix.os }}) runs-on: ${{ matrix.os }} strategy: matrix: os: [ubuntu-latest, macos-latest, windows-latest] steps: - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7 - name: Install Rust stable uses: dtolnay/rust-toolchain@4360b52568e2003a75bf9bc1d59f33a8e3fc893c # stable with: components: rustfmt, clippy - name: Cache cargo artifacts uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6 with: path: | ~/.cargo/registry ~/.cargo/git target key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }} restore-keys: ${{ runner.os }}-cargo- - name: cargo fmt --check if: matrix.os == 'ubuntu-latest' run: cargo fmt --all -- --check - name: cargo clippy if: matrix.os == 'ubuntu-latest' run: cargo clippy --all-targets --all-features -- -D warnings - name: cargo test run: cargo test --all-targets env: # exits 0 immediately — prevents any editor invocation from blocking CI # on Windows, Git for Windows provides true.exe on PATH EDITOR: true audit: name: Security Audit runs-on: ubuntu-latest steps: - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7 - uses: rustsec/audit-check@v2 with: token: ${{ secrets.GITHUB_TOKEN }}