Update ci.yml #3
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: CI | ||
|
Check failure on line 1 in .github/workflows/ci.yml
|
||
| on: | ||
| push: | ||
| branches: [master] | ||
| pull_request: | ||
| branches: [master] | ||
| env: | ||
| CARGO_TERM_COLOR: always | ||
| jobs: | ||
| test: | ||
| name: Test Suite | ||
| runs-on: ${{ matrix.os }} | ||
| strategy: | ||
| matrix: | ||
| os: [ubuntu-latest, windows-latest, macos-latest] | ||
| exclude: | ||
| # Only test beta on ubuntu to reduce CI load | ||
| - os: windows-latest | ||
| rust: beta | ||
| - os: macos-latest | ||
| rust: beta | ||
| steps: | ||
| - name: Checkout code | ||
| uses: actions/checkout@v5 | ||
| - name: Install Rust toolchain | ||
| uses: dtolnay/rust-toolchain@stable | ||
| with: | ||
| components: rustfmt, clippy | ||
| - name: Cache cargo registry | ||
| uses: actions/cache@v4 | ||
| with: | ||
| path: | | ||
| ~/.cargo/registry | ||
| ~/.cargo/git | ||
| target | ||
| key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }} | ||
| - name: Check formatting | ||
| run: cargo fmt --all -- --check | ||
| - name: Run clippy | ||
| run: cargo clippy --all-targets --all-features -- -D warnings | ||
| - name: Build (default features) | ||
| run: cargo build --verbose | ||
| - name: Build (no default features) | ||
| run: cargo build --no-default-features --verbose | ||
| - name: Build (all features) | ||
| run: cargo build --all-features --verbose | ||
| - name: Run tests | ||
| run: cargo test --verbose | ||
| - name: Run tests (no default features) | ||
| run: cargo test --no-default-features --verbose | ||
| - name: Run tests (all features) | ||
| run: cargo test --all-features --verbose | ||
| security: | ||
| name: Security Audit | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - name: Checkout code | ||
| uses: actions/checkout@v5 | ||
| - name: Install Rust toolchain | ||
| uses: dtolnay/rust-toolchain@stable | ||
| - name: Install cargo-audit | ||
| run: cargo install cargo-audit | ||
| - name: Run security audit | ||
| run: cargo audit | ||
| msrv: | ||
| name: Minimum Supported Rust Version | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - name: Checkout code | ||
| uses: actions/checkout@v5 | ||
| - uses: dtolnay/rust-toolchain@stable | ||
| with: | ||
| toolchain: stable | ||
| - name: Check if project builds with MSRV | ||
| run: cargo check --verbose | ||