CI failed at Lint with 1519 no-unsafe-* errors on every cross-package import. Three fresh-checkout issues, invisible locally because lib/ persists between runs: - Lint ran before Typecheck, but the type-aware ESLint config resolves vendor packages via their built declarations (tsconfig.typecheck.json -> vendor/*/lib), which Typecheck emits. Reordered. - The first-ever tsc -b resolved sibling vendor plugins through their package.json types (lib/index.d.ts, not yet emitted) — TS2307 until a second run. The source-level paths map moves from the root tsconfig.json (dev-only, not inherited by package builds) into tsconfig.base.json so the whole build graph resolves source-first; tsconfig.typecheck.json still overrides wholesale to lib resolution. - Hygiene ran publint (validates packed lib/index.js bundles) before Build emitted them. Reordered. Also: checkout/setup-node bumped v4 -> v6 (node20 runners are force-switched to node24 on 2026-06-16), the Build step name catches up with tsdown, and AGENTS.md documents the one case where a fresh clone needs `yarn typecheck` before `yarn lint`.
66 lines
1.9 KiB
YAML
66 lines
1.9 KiB
YAML
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
|
|
|
|
- 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
|