Feat/phase 26a multi provider ai #53
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] | |
| paths-ignore: | |
| - '**.md' | |
| - 'docs/**' | |
| - 'LICENSE' | |
| - '.gitignore' | |
| - 'HomebrewFormula/**' | |
| pull_request: | |
| branches: [main] | |
| paths-ignore: | |
| - '**.md' | |
| - 'docs/**' | |
| - 'LICENSE' | |
| - '.gitignore' | |
| - 'HomebrewFormula/**' | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| env: | |
| CARGO_TERM_COLOR: always | |
| RUST_BACKTRACE: 1 | |
| CARGO_INCREMENTAL: 0 | |
| CARGO_NET_RETRY: 10 | |
| jobs: | |
| # ============================================================ | |
| # Code Quality (always runs) | |
| # ============================================================ | |
| quality: | |
| name: Quality | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: dtolnay/rust-toolchain@stable | |
| with: | |
| components: rustfmt, clippy | |
| - uses: Swatinem/rust-cache@v2 | |
| with: | |
| cache-all-crates: true | |
| - name: Format | |
| run: cargo fmt --all --check | |
| - name: Lint | |
| run: cargo clippy --all-targets --all-features -- -D clippy::correctness -D clippy::suspicious -W clippy::all | |
| # ============================================================ | |
| # Security (always runs) | |
| # ============================================================ | |
| security: | |
| name: Security | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: dtolnay/rust-toolchain@stable | |
| - uses: Swatinem/rust-cache@v2 | |
| with: | |
| cache-all-crates: true | |
| - name: Cache security tools | |
| uses: actions/cache@v4 | |
| with: | |
| path: | | |
| ~/.cargo/bin/cargo-audit | |
| ~/.cargo/bin/cargo-deny | |
| key: security-tools-${{ runner.os }} | |
| - name: Audit | |
| run: command -v cargo-audit || cargo install cargo-audit && cargo audit | |
| continue-on-error: true # Advisory warnings in transitive deps | |
| - name: Licenses | |
| run: command -v cargo-deny || cargo install cargo-deny && cargo deny check | |
| # ============================================================ | |
| # Tests - Linux (always runs) | |
| # ============================================================ | |
| test-linux: | |
| name: Test (Linux) | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: dtolnay/rust-toolchain@stable | |
| - uses: Swatinem/rust-cache@v2 | |
| with: | |
| cache-all-crates: true | |
| - name: Run tests | |
| run: cargo test --all-features --workspace | |
| # ============================================================ | |
| # Tests - Cross Platform (PRs only) | |
| # ============================================================ | |
| test-cross: | |
| name: Test | |
| if: github.event_name == 'pull_request' | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: [macos-latest, windows-latest] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: dtolnay/rust-toolchain@stable | |
| - uses: Swatinem/rust-cache@v2 | |
| with: | |
| cache-all-crates: true | |
| - name: Run tests | |
| run: cargo test --all-features --workspace | |
| # ============================================================ | |
| # Build Verification (PRs only) | |
| # ============================================================ | |
| build: | |
| name: Build | |
| if: github.event_name == 'pull_request' | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - { os: ubuntu-latest, target: x86_64-unknown-linux-gnu } | |
| - { os: macos-latest, target: aarch64-apple-darwin } | |
| - { os: windows-latest, target: x86_64-pc-windows-msvc } | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: dtolnay/rust-toolchain@stable | |
| with: | |
| targets: ${{ matrix.target }} | |
| - uses: Swatinem/rust-cache@v2 | |
| with: | |
| key: build-${{ matrix.target }} | |
| cache-all-crates: true | |
| - name: Build | |
| run: cargo build --release --target ${{ matrix.target }} | |
| # ============================================================ | |
| # Commit Lint (PRs only) | |
| # ============================================================ | |
| commits: | |
| name: Commits | |
| runs-on: ubuntu-latest | |
| if: github.event_name == 'pull_request' | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - uses: wagoid/commitlint-github-action@v6 | |
| with: | |
| configFile: .commitlintrc.json |