| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273 |
- name: CI
- on:
- push:
- branches: [main, master]
- pull_request:
- concurrency:
- group: ${{ github.workflow }}-${{ github.ref }}
- cancel-in-progress: true
- jobs:
- checks:
- runs-on: ubuntu-latest
- strategy:
- fail-fast: false
- matrix:
- node: [24, 26]
- name: node ${{ matrix.node }}
- steps:
- - uses: actions/checkout@v6
- - uses: actions/setup-node@v6
- with:
- node-version: ${{ matrix.node }}
- - name: Enable corepack (yarn 4)
- run: corepack enable
- - name: Install (immutable)
- run: yarn install --immutable
- - name: Constraints
- run: yarn constraints
- # Before lint: the type-aware ESLint config resolves vendor packages via
- # their built declarations (tsconfig.typecheck.json -> vendor/*/lib),
- # which `yarn typecheck` emits. Lint on a fresh checkout would otherwise
- # see unresolved types and erupt with no-unsafe-* errors.
- - name: Typecheck (src + tests + examples)
- run: yarn typecheck
- - name: Lint
- run: yarn lint
- # Doc-sync gates (RFC 006). doc-typecheck compiles the fenced ts blocks in
- # the docs and resolves vendor packages via their built declarations, which
- # the typecheck step above emits — so it runs after typecheck. The event
- # taxonomy check only reads source. Same `doc-sync` script the pre-push
- # hook runs (ADR 0007: one source of truth).
- - name: Doc-sync gates (doc code blocks + event taxonomy)
- run: yarn doc-sync
- - name: Tests with coverage gate (per-file 100%)
- run: yarn test:coverage
- # Before hygiene: publint validates the packed artifacts (lib/index.js),
- # which only the tsdown bundling step emits.
- - name: Build (tsc -b + tsdown bundles)
- run: yarn build
- - name: Hygiene (knip + publint)
- run: yarn knip && yarn publint
- - name: Demo smoke test
- run: |
- set -euo pipefail
- out=$(printf 'echo ci smoke\n' | timeout 60 node --expose-internals --import tsx examples/echo-agent/start.ts 2>&1)
- echo "$out"
- echo "$out" | grep -q '\[tool call\] echo({"text":"ci smoke"})'
- echo "$out" | grep -q '\[tool result\] ECHO: CI SMOKE'
- test -f examples/echo-agent/main-session.jsonl
- rm -f examples/echo-agent/*.jsonl
|