| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262 |
- name: CI
- on:
- push:
- branches: [main, master]
- pull_request:
- concurrency:
- group: ${{ github.workflow }}-${{ github.ref }}
- cancel-in-progress: true
- permissions:
- contents: read
- env:
- PRIMARY_NODE_VERSION: '24'
- jobs:
- quality:
- runs-on: ubuntu-latest
- name: quality / ${{ matrix.name }}
- strategy:
- fail-fast: false
- matrix:
- include:
- - name: constraints
- command: pnpm run constraints
- - name: typecheck
- command: pnpm run typecheck
- - name: lint
- command: |
- # Root typecheck validates the package/vendor reference graph and
- # refreshes TSC intermediates before type-aware ESLint loads the
- # project graph.
- pnpm run typecheck
- NODE_OPTIONS=--max-old-space-size=8192 pnpm run lint
- - name: coverage
- command: pnpm run test:coverage
- - name: snapshots
- command: pnpm run test:snapshot
- - name: demo smoke
- command: |
- set -euo pipefail
- out=$(printf 'echo ci smoke\n' | timeout 60 pnpm run demo:echo 2>&1)
- echo "$out"
- echo "$out" | grep -q '\[tool call\] echo({"text":"ci smoke"})'
- echo "$out" | grep -q '\[tool result\] ECHO: CI SMOKE'
- # The JSONL backend (root ./.sessions, no cwd -> _no-cwd bucket)
- # writes a per-run session log named main-session-<uuid>.jsonl.
- ls .sessions/_no-cwd/main-session-*.jsonl >/dev/null
- rm -rf .sessions
- steps:
- - uses: actions/checkout@v6
- - uses: actions/setup-node@v6
- with:
- node-version: ${{ env.PRIMARY_NODE_VERSION }}
- - name: Enable corepack (pnpm)
- run: corepack enable
- - name: Resolve pnpm store path
- id: pnpm-store
- run: echo "path=$(pnpm store path --silent)" >> "$GITHUB_OUTPUT"
- - uses: actions/cache@v4
- with:
- path: ${{ steps.pnpm-store.outputs.path }}
- key: ${{ runner.os }}-node-${{ env.PRIMARY_NODE_VERSION }}-pnpm-${{ hashFiles('pnpm-lock.yaml') }}
- restore-keys: |
- ${{ runner.os }}-node-${{ env.PRIMARY_NODE_VERSION }}-pnpm-
- - name: Install (immutable)
- run: pnpm install --frozen-lockfile
- - name: Run ${{ matrix.name }}
- run: ${{ matrix.command }}
- docs:
- runs-on: ubuntu-latest
- name: docs / ${{ matrix.name }}
- strategy:
- fail-fast: false
- matrix:
- include:
- - name: doc-typecheck
- command: pnpm run doc-typecheck
- - name: cordis catalog
- command: pnpm run verify-cordis-catalog
- - name: tool catalog
- command: pnpm run verify-tool-catalog
- - name: persistence catalog
- command: pnpm run verify-persistence-catalog
- - name: doc graphs
- command: pnpm run verify-doc-graphs
- - name: markdown wrap
- command: pnpm run verify-md-wrap
- - name: markdown links
- command: pnpm run verify-md-links
- - name: doc refs
- command: pnpm run verify-doc-refs
- - name: package paths
- command: pnpm run verify-package-paths
- - name: mermaid
- command: pnpm run verify-mermaid
- - name: rfc classification
- command: pnpm run verify-rfc-classification
- - name: rfc format
- command: pnpm run verify-rfc-format
- - name: type equivalence
- command: pnpm run verify-type-equiv
- - name: translation pairing
- command: pnpm run verify-translation-pairing
- - name: doc budgets
- command: pnpm run verify-doc-budgets
- - name: module graph
- command: pnpm run verify-module-graph
- steps:
- - uses: actions/checkout@v6
- - uses: actions/setup-node@v6
- with:
- node-version: ${{ env.PRIMARY_NODE_VERSION }}
- - name: Enable corepack (pnpm)
- run: corepack enable
- - name: Resolve pnpm store path
- id: pnpm-store
- run: echo "path=$(pnpm store path --silent)" >> "$GITHUB_OUTPUT"
- - uses: actions/cache@v4
- with:
- path: ${{ steps.pnpm-store.outputs.path }}
- key: ${{ runner.os }}-node-${{ env.PRIMARY_NODE_VERSION }}-pnpm-${{ hashFiles('pnpm-lock.yaml') }}
- restore-keys: |
- ${{ runner.os }}-node-${{ env.PRIMARY_NODE_VERSION }}-pnpm-
- - name: Install (immutable)
- run: pnpm install --frozen-lockfile
- - name: Run ${{ matrix.name }}
- run: ${{ matrix.command }}
- build:
- runs-on: ubuntu-latest
- name: build
- steps:
- - uses: actions/checkout@v6
- - uses: actions/setup-node@v6
- with:
- node-version: ${{ env.PRIMARY_NODE_VERSION }}
- - name: Enable corepack (pnpm)
- run: corepack enable
- - name: Resolve pnpm store path
- id: pnpm-store
- run: echo "path=$(pnpm store path --silent)" >> "$GITHUB_OUTPUT"
- - uses: actions/cache@v4
- with:
- path: ${{ steps.pnpm-store.outputs.path }}
- key: ${{ runner.os }}-node-${{ env.PRIMARY_NODE_VERSION }}-pnpm-${{ hashFiles('pnpm-lock.yaml') }}
- restore-keys: |
- ${{ runner.os }}-node-${{ env.PRIMARY_NODE_VERSION }}-pnpm-
- - name: Install (immutable)
- run: pnpm install --frozen-lockfile
- - name: Build (tsc -b + tsdown bundles)
- run: pnpm run build
- - uses: actions/upload-artifact@v4
- with:
- name: build-output
- path: |
- packages/*/*/lib
- vendor/*/lib
- if-no-files-found: error
- retention-days: 1
- artifact-gate:
- runs-on: ubuntu-latest
- name: artifact / ${{ matrix.name }}
- needs: build
- strategy:
- fail-fast: false
- matrix:
- include:
- - name: hygiene
- command: pnpm run hygiene
- - name: built-bin smoke
- command: pnpm exec vitest run --config vitest.e2e.config.ts packages/ui/stdio-agent/tests/built-bin.e2e.ts packages/ui/acp-agent/tests/built-bin.e2e.ts
- steps:
- - uses: actions/checkout@v6
- - uses: actions/setup-node@v6
- with:
- node-version: ${{ env.PRIMARY_NODE_VERSION }}
- - name: Enable corepack (pnpm)
- run: corepack enable
- - name: Resolve pnpm store path
- id: pnpm-store
- run: echo "path=$(pnpm store path --silent)" >> "$GITHUB_OUTPUT"
- - uses: actions/cache@v4
- with:
- path: ${{ steps.pnpm-store.outputs.path }}
- key: ${{ runner.os }}-node-${{ env.PRIMARY_NODE_VERSION }}-pnpm-${{ hashFiles('pnpm-lock.yaml') }}
- restore-keys: |
- ${{ runner.os }}-node-${{ env.PRIMARY_NODE_VERSION }}-pnpm-
- - name: Install (immutable)
- run: pnpm install --frozen-lockfile
- - uses: actions/download-artifact@v4
- with:
- name: build-output
- - name: Run ${{ matrix.name }}
- run: ${{ matrix.command }}
- node-compat:
- runs-on: ubuntu-latest
- name: node ${{ matrix.node }} compatibility
- strategy:
- fail-fast: false
- matrix:
- node: [26]
- steps:
- - uses: actions/checkout@v6
- - uses: actions/setup-node@v6
- with:
- node-version: ${{ matrix.node }}
- - name: Enable corepack (pnpm)
- run: corepack enable
- - name: Resolve pnpm store path
- id: pnpm-store
- run: echo "path=$(pnpm store path --silent)" >> "$GITHUB_OUTPUT"
- - uses: actions/cache@v4
- with:
- path: ${{ steps.pnpm-store.outputs.path }}
- key: ${{ runner.os }}-node-${{ matrix.node }}-pnpm-${{ hashFiles('pnpm-lock.yaml') }}
- restore-keys: |
- ${{ runner.os }}-node-${{ matrix.node }}-pnpm-
- - name: Install (immutable)
- run: pnpm install --frozen-lockfile
- - name: Typecheck (src + tests + examples)
- run: pnpm run typecheck
- - name: Unit tests
- run: pnpm run test
|