fix: cargo fmt remaining files (handoff, watch, main) #8
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 | |
| - 'feat/**' | |
| - 'fix/**' | |
| - 'chore/**' | |
| paths: | |
| - '.github/workflows/ci.yml' | |
| - 'rust/**' | |
| - 'agents/**' | |
| - 'tools/**' | |
| - 'scripts/**' | |
| pull_request: | |
| branches: | |
| - main | |
| paths: | |
| - '.github/workflows/ci.yml' | |
| - 'rust/**' | |
| - 'agents/**' | |
| - 'tools/**' | |
| - 'scripts/**' | |
| workflow_dispatch: | |
| concurrency: | |
| group: ci-${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} | |
| cancel-in-progress: true | |
| env: | |
| CARGO_TERM_COLOR: always | |
| RUST_BACKTRACE: 1 | |
| defaults: | |
| run: | |
| working-directory: rust | |
| # ── Job: validate agents ───────────────────────────────────────────────────── | |
| jobs: | |
| validate-agents: | |
| name: Validate agent files | |
| runs-on: ubuntu-latest | |
| defaults: | |
| run: | |
| working-directory: . | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Check agent MD files | |
| run: bash scripts/validate-agents.sh | |
| # ── Job: rustfmt ───────────────────────────────────────────────────────────── | |
| fmt: | |
| name: cargo fmt | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: dtolnay/rust-toolchain@stable | |
| with: | |
| components: rustfmt | |
| - uses: Swatinem/rust-cache@v2 | |
| with: | |
| workspaces: rust -> target | |
| - name: Check formatting | |
| run: cargo fmt --all --check | |
| # ── Job: clippy ────────────────────────────────────────────────────────────── | |
| clippy: | |
| name: cargo clippy | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: dtolnay/rust-toolchain@stable | |
| with: | |
| components: clippy | |
| - uses: Swatinem/rust-cache@v2 | |
| with: | |
| workspaces: rust -> target | |
| - name: Run clippy | |
| run: cargo clippy --workspace -- -D warnings | |
| # ── Job: test ──────────────────────────────────────────────────────────────── | |
| test: | |
| name: cargo test | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: dtolnay/rust-toolchain@stable | |
| - uses: Swatinem/rust-cache@v2 | |
| with: | |
| workspaces: rust -> target | |
| - name: Run workspace tests | |
| run: cargo test --workspace | |
| # ── Job: Windows smoke build ───────────────────────────────────────────────── | |
| windows-smoke: | |
| name: Windows build smoke | |
| runs-on: windows-latest | |
| defaults: | |
| run: | |
| working-directory: rust | |
| shell: pwsh | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: dtolnay/rust-toolchain@stable | |
| - uses: Swatinem/rust-cache@v2 | |
| with: | |
| workspaces: rust -> target | |
| - name: Build (debug) | |
| run: cargo build --workspace | |
| - name: Smoke test binary | |
| run: | | |
| $bin = "target\debug\claude-tools.exe" | |
| if (Test-Path $bin) { | |
| & $bin --version | |
| Write-Host "claude-tools binary OK" | |
| } else { | |
| Write-Host "No claude-tools binary found (workspace may not include binary crate yet)" | |
| } | |
| # ── Job: dogfood build ─────────────────────────────────────────────────────── | |
| dogfood: | |
| name: Dogfood build (Linux) | |
| runs-on: ubuntu-latest | |
| needs: [fmt, clippy, test] | |
| defaults: | |
| run: | |
| working-directory: . | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: dtolnay/rust-toolchain@stable | |
| - uses: Swatinem/rust-cache@v2 | |
| with: | |
| workspaces: rust -> target | |
| - name: Build via dogfood script | |
| run: | | |
| bash scripts/dogfood-build.sh | |
| - name: Validate agents with built binary | |
| run: bash scripts/validate-agents.sh |