chore(deps)(deps): bump the rust-dependencies group across 1 directory with 7 updates #259
Workflow file for this run
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 | |
| on: | |
| pull_request: | |
| branches: [ main, develop ] | |
| push: | |
| branches: [ main, develop ] | |
| permissions: | |
| contents: read | |
| env: | |
| CARGO_TERM_COLOR: always | |
| RUST_BACKTRACE: 1 | |
| jobs: | |
| # Check formatting and linting | |
| check: | |
| name: Check | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v6 | |
| - name: Install Rust toolchain | |
| uses: dtolnay/rust-toolchain@stable | |
| with: | |
| components: rustfmt, clippy | |
| - name: Setup Rust cache | |
| uses: Swatinem/rust-cache@v2 | |
| with: | |
| key: check | |
| - name: Check formatting | |
| run: cargo fmt --all -- --check | |
| - name: Run clippy | |
| run: cargo clippy --all-targets --all-features -- -D warnings | |
| # Build and test with cargo-chef for optimized caching | |
| test: | |
| name: Test | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| matrix: | |
| os: [ubuntu-latest, macos-latest, windows-latest] | |
| rust: [stable, beta] | |
| exclude: | |
| # Reduce CI load by testing beta only on Ubuntu | |
| - os: macos-latest | |
| rust: beta | |
| - os: windows-latest | |
| rust: beta | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v6 | |
| - name: Install Rust toolchain | |
| uses: dtolnay/rust-toolchain@stable | |
| with: | |
| toolchain: ${{ matrix.rust }} | |
| # Install cargo-chef for optimized Docker-style dependency caching | |
| - name: Install cargo-chef | |
| uses: taiki-e/install-action@v2 | |
| with: | |
| tool: cargo-chef | |
| - name: Setup Rust cache | |
| uses: Swatinem/rust-cache@v2 | |
| with: | |
| key: test-${{ matrix.os }}-${{ matrix.rust }} | |
| # Prepare the build plan for cargo-chef | |
| - name: Prepare build plan | |
| run: cargo chef prepare --recipe-path recipe.json | |
| # Cook dependencies (this will be cached) | |
| - name: Cook dependencies | |
| run: cargo chef cook --release --recipe-path recipe.json | |
| # Build the project | |
| - name: Build | |
| run: cargo build --release --all-features | |
| # Run tests | |
| - name: Run tests | |
| run: cargo test --release --all-features | |
| # Run doc tests | |
| - name: Run doc tests | |
| run: cargo test --release --doc | |
| # Coverage report (optional, runs only on main branch pushes) | |
| coverage: | |
| name: Coverage | |
| runs-on: ubuntu-latest | |
| if: github.ref == 'refs/heads/main' && github.event_name == 'push' | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v6 | |
| - name: Install Rust toolchain | |
| uses: dtolnay/rust-toolchain@stable | |
| - name: Install cargo-tarpaulin | |
| uses: taiki-e/install-action@v2 | |
| with: | |
| tool: cargo-tarpaulin | |
| - name: Setup Rust cache | |
| uses: Swatinem/rust-cache@v2 | |
| with: | |
| key: coverage | |
| - name: Generate coverage report | |
| run: cargo tarpaulin --verbose --all-features --workspace --timeout 120 --out xml --output-dir ./coverage | |
| - name: Upload coverage to Codecov | |
| uses: codecov/codecov-action@v5 | |
| with: | |
| file: ./coverage/cobertura.xml | |
| fail_ci_if_error: false |