name: CI
on:
push:
pull_request:
permissions:
contents: read
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
env:
CARGO_TERM_COLOR: always
jobs:
quality:
name: Format, lint, test, and build
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- name: Check out repository
uses: actions/checkout@v7
- name: Install stable Rust
uses: dtolnay/rust-toolchain@stable
with:
components: rustfmt, clippy
- uses: actions/setup-node@v6
with:
node-version: "24"
package-manager-cache: false
- name: Cache Cargo artifacts
uses: Swatinem/rust-cache@v2
- name: Test and build viewer
working-directory: web
run: |
npm ci
npm test
npm run typecheck
npm run build
git diff --exit-code -- dist
- name: Check formatting
run: cargo fmt --check
- name: Run Clippy
run: cargo clippy --locked --all-targets -- -D warnings
- name: Run tests
run: cargo test --locked --all-targets
- name: Test release installer
run: ./tests/install_script.sh
- name: Validate release workflow contract
run: ./tests/release_workflow.sh
- name: Test npm package
run: node --test tests/npm_package.mjs
- name: Test GitHub Pages site
run: node --test tests/site.mjs
- name: Validate native Agent integrations
run: |
node --test ../../tests/integrations.mjs
npm pack --dry-run --ignore-scripts
working-directory: integrations/pi-lwc
- name: Build release binary
run: cargo build --locked --release
windows-codegraph:
name: Windows CodeGraph path regression
runs-on: windows-2025
timeout-minutes: 30
steps:
- name: Check out repository
uses: actions/checkout@v7
- name: Install stable Rust
uses: dtolnay/rust-toolchain@stable
- uses: Swatinem/rust-cache@v2
with:
key: windows-codegraph
- name: Test Windows CodeGraph path forwarding
run: cargo test --locked --test codegraph_cli_windows --test agent_cli_windows