chore(deps): bump clap from 4.5.54 to 4.5.56 in the minor-and-patch group #149
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: | |
| push: | |
| branches: [main, develop] | |
| pull_request: | |
| branches: [main, develop] | |
| schedule: | |
| # Weekly dependency security check | |
| - cron: '0 0 * * 0' | |
| env: | |
| CARGO_TERM_COLOR: always | |
| CARGO_INCREMENTAL: 0 | |
| CARGO_NET_RETRY: 10 | |
| RUST_BACKTRACE: short | |
| RUSTFLAGS: "-D warnings" | |
| RUSTUP_MAX_RETRIES: 10 | |
| # Default to minimal permissions (security best practice) | |
| permissions: | |
| contents: read | |
| # Cancel previous runs on new push | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| # Detect which files changed to optimize job execution | |
| changes: | |
| name: Detect Changes | |
| runs-on: ubuntu-latest | |
| permissions: | |
| pull-requests: read | |
| outputs: | |
| rust: ${{ steps.filter.outputs.rust }} | |
| python: ${{ steps.filter.outputs.python }} | |
| node: ${{ steps.filter.outputs.node }} | |
| ci: ${{ steps.filter.outputs.ci }} | |
| docs: ${{ steps.filter.outputs.docs }} | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: dorny/paths-filter@v3 | |
| id: filter | |
| with: | |
| filters: | | |
| rust: | |
| - '**/*.rs' | |
| - '**/Cargo.toml' | |
| - '**/Cargo.lock' | |
| - 'deny.toml' | |
| - 'clippy.toml' | |
| - 'rustfmt.toml' | |
| python: | |
| - 'crates/exarch-python/**' | |
| node: | |
| - 'crates/exarch-node/**' | |
| ci: | |
| - '.github/workflows/**' | |
| - '.github/labeler.yml' | |
| docs: | |
| - '**/*.md' | |
| - '**/README.md' | |
| # Quick checks first - fail fast | |
| format: | |
| name: Format Check | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 5 | |
| needs: changes | |
| if: | | |
| needs.changes.outputs.rust == 'true' || | |
| github.ref == 'refs/heads/main' || | |
| github.ref == 'refs/heads/develop' | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: Install nightly Rust | |
| uses: dtolnay/rust-toolchain@nightly | |
| with: | |
| components: rustfmt | |
| - name: Check formatting | |
| run: cargo +nightly fmt --all -- --check | |
| clippy: | |
| name: Clippy | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 15 | |
| needs: changes | |
| if: | | |
| needs.changes.outputs.rust == 'true' || | |
| github.ref == 'refs/heads/main' || | |
| github.ref == 'refs/heads/develop' | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: Install Rust stable | |
| uses: dtolnay/rust-toolchain@stable | |
| with: | |
| components: clippy | |
| - name: Cache Cargo dependencies | |
| uses: Swatinem/rust-cache@v2 | |
| with: | |
| shared-key: "clippy" | |
| save-if: ${{ github.ref == 'refs/heads/main' }} | |
| - name: Run Clippy | |
| run: cargo clippy --workspace --all-targets --all-features -- -D warnings | |
| documentation: | |
| name: Documentation | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 15 | |
| needs: changes | |
| if: | | |
| needs.changes.outputs.rust == 'true' || | |
| github.ref == 'refs/heads/main' || | |
| github.ref == 'refs/heads/develop' | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: Install Rust stable | |
| uses: dtolnay/rust-toolchain@stable | |
| - name: Cache Cargo dependencies | |
| uses: Swatinem/rust-cache@v2 | |
| with: | |
| shared-key: "doc" | |
| save-if: ${{ github.ref == 'refs/heads/main' }} | |
| - name: Check documentation | |
| env: | |
| RUSTDOCFLAGS: "-D warnings" | |
| run: cargo doc --no-deps --all-features --workspace | |
| # Security audit | |
| security: | |
| name: Security Audit | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 10 | |
| needs: changes | |
| if: | | |
| needs.changes.outputs.rust == 'true' || | |
| github.ref == 'refs/heads/main' || | |
| github.ref == 'refs/heads/develop' || | |
| github.event_name == 'schedule' | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: Run cargo-deny | |
| uses: EmbarkStudios/cargo-deny-action@v2 | |
| with: | |
| log-level: warn | |
| command: check | |
| arguments: --all-features | |
| # Cross-platform tests with matrix | |
| test: | |
| name: Test (${{ matrix.os }}) | |
| needs: [changes, format] | |
| runs-on: ${{ matrix.os }} | |
| timeout-minutes: 30 | |
| if: | | |
| needs.changes.outputs.rust == 'true' || | |
| github.ref == 'refs/heads/main' || | |
| github.ref == 'refs/heads/develop' | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: [ubuntu-latest, macos-latest, windows-latest] | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: Install Rust stable | |
| uses: dtolnay/rust-toolchain@stable | |
| - name: Cache Cargo dependencies | |
| uses: Swatinem/rust-cache@v2 | |
| with: | |
| shared-key: "test-${{ matrix.os }}" | |
| save-if: ${{ github.ref == 'refs/heads/main' }} | |
| - name: Install nextest | |
| uses: taiki-e/install-action@v2 | |
| with: | |
| tool: nextest | |
| - name: Build all targets | |
| run: cargo build --workspace --all-targets --all-features --exclude exarch-python --exclude exarch-node | |
| - name: Run tests | |
| run: cargo nextest run --workspace --all-features --no-fail-fast --exclude exarch-python --exclude exarch-node | |
| - name: Run doctests | |
| run: cargo test --doc --workspace --all-features --exclude exarch-python --exclude exarch-node | |
| # Test Python bindings with coverage | |
| test-python: | |
| name: Test Python Bindings | |
| needs: [changes, format] | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 20 | |
| if: | | |
| needs.changes.outputs.python == 'true' || | |
| github.ref == 'refs/heads/main' || | |
| github.ref == 'refs/heads/develop' | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: Install Rust stable | |
| uses: dtolnay/rust-toolchain@stable | |
| - name: Cache Cargo dependencies | |
| uses: Swatinem/rust-cache@v2 | |
| with: | |
| shared-key: "python" | |
| save-if: ${{ github.ref == 'refs/heads/main' }} | |
| - name: Set up Python | |
| uses: actions/setup-python@v6 | |
| with: | |
| python-version: '3.11' | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@v7 | |
| - name: Install dependencies | |
| run: | | |
| cd crates/exarch-python | |
| uv pip install --system maturin ruff mypy pytest pytest-cov | |
| - name: Format check with ruff | |
| run: | | |
| cd crates/exarch-python | |
| ruff format --check . | |
| - name: Lint with ruff | |
| run: | | |
| cd crates/exarch-python | |
| ruff check . | |
| - name: Type check with mypy | |
| run: | | |
| cd crates/exarch-python | |
| mypy . --ignore-missing-imports || true | |
| - name: Build Python bindings | |
| run: | | |
| cd crates/exarch-python | |
| maturin build --release | |
| - name: Install Python bindings | |
| run: uv pip install --system target/wheels/*.whl | |
| - name: Test Python bindings with coverage | |
| run: | | |
| cd crates/exarch-python | |
| pytest tests/ -v --cov --cov-report=xml:coverage.xml | |
| - name: Upload Python coverage to Codecov | |
| uses: codecov/codecov-action@v5 | |
| with: | |
| token: ${{ secrets.CODECOV_TOKEN }} | |
| files: crates/exarch-python/coverage.xml | |
| flags: exarch-python | |
| fail_ci_if_error: false | |
| # Test Node.js bindings with coverage | |
| test-node: | |
| name: Test Node.js Bindings | |
| needs: [changes, format] | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 20 | |
| if: | | |
| needs.changes.outputs.node == 'true' || | |
| github.ref == 'refs/heads/main' || | |
| github.ref == 'refs/heads/develop' | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: Install Rust stable | |
| uses: dtolnay/rust-toolchain@stable | |
| - name: Cache Cargo dependencies | |
| uses: Swatinem/rust-cache@v2 | |
| with: | |
| shared-key: "node" | |
| save-if: ${{ github.ref == 'refs/heads/main' }} | |
| - name: Set up Node.js | |
| uses: actions/setup-node@v6 | |
| with: | |
| node-version: '20' | |
| - name: Install dependencies | |
| run: | | |
| cd crates/exarch-node | |
| npm install | |
| - name: Format check with Biome | |
| run: | | |
| cd crates/exarch-node | |
| npm run format:check | |
| - name: Lint with Biome | |
| run: | | |
| cd crates/exarch-node | |
| npm run lint | |
| - name: Build Node.js bindings | |
| run: | | |
| cd crates/exarch-node | |
| npm run build | |
| - name: Test Node.js bindings | |
| run: | | |
| cd crates/exarch-node | |
| npm test | |
| # MSRV check (exarch-core only) | |
| msrv: | |
| name: MSRV Check (exarch-core) | |
| needs: [changes, format] | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 15 | |
| if: | | |
| needs.changes.outputs.rust == 'true' || | |
| github.ref == 'refs/heads/main' || | |
| github.ref == 'refs/heads/develop' | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: Install Rust 1.89.0 | |
| uses: dtolnay/rust-toolchain@master | |
| with: | |
| toolchain: "1.89.0" | |
| - name: Cache Cargo dependencies | |
| uses: Swatinem/rust-cache@v2 | |
| with: | |
| shared-key: "msrv" | |
| save-if: ${{ github.ref == 'refs/heads/main' }} | |
| - name: Check MSRV for exarch-core | |
| run: cargo check -p exarch-core --all-features | |
| # Code coverage (Linux only) - codecov auto-distributes by paths | |
| coverage: | |
| name: Code Coverage | |
| needs: [changes, format] | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 30 | |
| permissions: | |
| contents: read | |
| if: | | |
| needs.changes.outputs.rust == 'true' || | |
| github.ref == 'refs/heads/main' || | |
| github.ref == 'refs/heads/develop' | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: Install Rust stable | |
| uses: dtolnay/rust-toolchain@stable | |
| - name: Cache Cargo dependencies | |
| uses: Swatinem/rust-cache@v2 | |
| with: | |
| shared-key: "coverage" | |
| save-if: ${{ github.ref == 'refs/heads/main' }} | |
| - name: Install cargo-llvm-cov | |
| uses: taiki-e/install-action@v2 | |
| with: | |
| tool: cargo-llvm-cov | |
| - name: Install nextest | |
| uses: taiki-e/install-action@v2 | |
| with: | |
| tool: nextest | |
| - name: Generate coverage report | |
| run: | | |
| cargo llvm-cov --all-features --workspace \ | |
| --exclude exarch-python --exclude exarch-node \ | |
| --lcov --output-path lcov.info nextest | |
| - name: Upload coverage to Codecov | |
| uses: codecov/codecov-action@v5 | |
| with: | |
| token: ${{ secrets.CODECOV_TOKEN }} | |
| files: lcov.info | |
| fail_ci_if_error: false | |
| verbose: true | |
| # All checks passed | |
| ci-success: | |
| name: CI Success | |
| needs: [format, clippy, documentation, security, test, msrv] | |
| runs-on: ubuntu-latest | |
| if: always() | |
| steps: | |
| - name: Check all jobs | |
| run: | | |
| # Required jobs that must pass | |
| REQUIRED_JOBS=( | |
| "${{ needs.format.result }}" | |
| "${{ needs.clippy.result }}" | |
| "${{ needs.documentation.result }}" | |
| "${{ needs.security.result }}" | |
| "${{ needs.test.result }}" | |
| "${{ needs.msrv.result }}" | |
| ) | |
| for result in "${REQUIRED_JOBS[@]}"; do | |
| if [[ "$result" != "success" && "$result" != "skipped" ]]; then | |
| echo "Required job failed or was cancelled: $result" | |
| exit 1 | |
| fi | |
| done | |
| echo "All required jobs passed successfully!" |