docs: version 0.46.0 docs (#1322) #2659
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] | |
| pull_request: | |
| branches: [main] | |
| permissions: | |
| contents: read | |
| jobs: | |
| ci: | |
| name: test (${{ matrix.os }}) | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: [ubuntu-latest, windows-latest, macos-latest] | |
| steps: | |
| - uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 | |
| with: | |
| persist-credentials: false | |
| - uses: dtolnay/rust-toolchain@4be9e76fd7c4901c61fb841f559994984270fce7 # stable | |
| with: | |
| toolchain: stable | |
| components: clippy, rustfmt | |
| - uses: Swatinem/rust-cache@c19371144df3bb44fab255c43d04cbc2ab54d1c4 # v2 | |
| with: | |
| # Keep one stable dependency cache namespace across the OS matrix. | |
| shared-key: agnix-workspace | |
| save-if: ${{ github.ref == 'refs/heads/main' }} | |
| - name: Format check | |
| if: matrix.os == 'ubuntu-latest' | |
| run: cargo fmt --check --all | |
| - name: Clippy | |
| if: matrix.os == 'ubuntu-latest' | |
| run: cargo clippy --workspace --all-targets --all-features -- -D warnings | |
| - name: Test | |
| run: cargo test --workspace | |
| - name: Rule efficacy eval | |
| if: matrix.os == 'ubuntu-latest' | |
| # Exits non-zero if any tests/eval.yaml case's fired rules diverge from | |
| # its expected set. Keeps the eval fixtures from silently drifting as | |
| # rules are added or rescoped (see #981). | |
| run: cargo run -p agnix-cli --bin agnix -- eval tests/eval.yaml | |
| - name: Kiro S-tier Gate | |
| if: matrix.os == 'ubuntu-latest' | |
| run: cargo test -p agnix-cli --test kiro_ci_gate -- --include-ignored | |
| - name: Rule bookkeeping sync check | |
| if: matrix.os == 'ubuntu-latest' | |
| # Fails if total_rules, count phrases, or the agnix-rules mirror | |
| # drifted from knowledge-base/rules.json. Fix by running | |
| # `node scripts/sync-rule-bookkeeping.js` locally. | |
| run: node scripts/sync-rule-bookkeeping.js --check --skip-docs | |
| - name: Rule count table check | |
| if: matrix.os == 'ubuntu-latest' | |
| # Fails if human-maintained rule count tables or current docs drift | |
| # from knowledge-base/rules.json. | |
| run: python3 scripts/check-rule-counts.py | |
| - name: Locale sync check | |
| if: matrix.os == 'ubuntu-latest' | |
| # The i18n!() macro loads from each crate's own locales/ directory, so a | |
| # diagnostic string edited only in the root copy silently never reaches | |
| # the binary. Nothing gated this: the script existed but no workflow ran | |
| # it. | |
| run: bash scripts/check-locale-sync.sh | |
| - name: Schema sync check | |
| if: matrix.os == 'ubuntu-latest' | |
| # Fails if the committed .agnix.toml schema differs from the current | |
| # binary output, or if the VS Code extension copy drifted. | |
| run: | | |
| cargo run -p agnix-cli --bin agnix -- schema --fix --output schemas/agnix.json | |
| cmp schemas/agnix.json editors/vscode/schemas/agnix.json | |
| git diff --exit-code -- schemas/agnix.json editors/vscode/schemas/agnix.json | |
| agnix: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 | |
| with: | |
| persist-credentials: false | |
| - uses: dtolnay/rust-toolchain@4be9e76fd7c4901c61fb841f559994984270fce7 # stable | |
| with: | |
| toolchain: stable | |
| - name: Validate agent configurations | |
| uses: ./ | |
| with: | |
| config: '.agnix.toml' | |
| fail-on-error: 'true' | |
| build-from-source: 'true' |