undici 8.5.0 requires Node >= 22.19.0 (its declared engines), so CI's Node 20.x could not load undici's CacheStorage (missing webidl.util.markAsUncloneable) and the proxy integration tests failed. Bump the CI setup-node to 22.x to match the repo's Node floor. Reconcile the declared floor with undici's real requirement: bump root engines.node to >=22.19.0 and correct the CLI README note (undici 8.5.0 needs >=22.19.0, not >=22.7.5). Also document proxy support in the web README and clarify that a caller-supplied eventSourceInit.fetch bypasses the proxy wrapper by design. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01S3fTN8H3R8YV4yUGvZjYnX
62 lines
2.5 KiB
YAML
62 lines
2.5 KiB
YAML
name: Run install, format, lint, build, and test on every push
|
|
|
|
on: [push]
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- name: Checkout code
|
|
uses: actions/checkout@v6
|
|
|
|
- name: Setup Node.js
|
|
uses: actions/setup-node@v6
|
|
with:
|
|
node-version: '22.x'
|
|
cache: 'npm'
|
|
|
|
- name: Install dependencies (root + all clients)
|
|
# The root postinstall (scripts/install-clients.mjs) cascades
|
|
# `npm install` into clients/web, clients/cli, clients/tui, and
|
|
# clients/launcher, so this single step sets up every client.
|
|
run: npm install
|
|
|
|
- name: Validate (format, lint, build, fast tests)
|
|
# Each client self-validates: format:check + lint + build + test (no
|
|
# coverage instrumentation — fast). This also builds every client bundle
|
|
# (web dist, cli/tui/launcher) that the smokes below need. The per-file
|
|
# coverage gate (`npm run coverage`) is intentionally NOT run in CI — run
|
|
# it locally before pushing when you want the gate (#1484).
|
|
run: npm run validate
|
|
|
|
- name: Run web integration tests
|
|
# `validate` runs the web UNIT project only (fast); the integration
|
|
# project (real stdio/HTTP servers, e2e OAuth, filesystem storage) is
|
|
# otherwise only reached via test:coverage. Run it here without coverage
|
|
# so CI still exercises those paths even though the gate is local-only.
|
|
working-directory: ./clients/web
|
|
run: npm run test:integration
|
|
|
|
- name: Run cross-client smokes
|
|
# End-to-end smokes through the built launcher (--help dispatch + prod
|
|
# CLI/web). Not part of any client's `validate`: it needs the
|
|
# cli/tui/launcher bundles, which `validate` above already built
|
|
# (smoke:web builds clients/web/dist on demand — #1486). smoke:tui
|
|
# self-skips here — the Ink TUI needs a real TTY (raw mode) that headless
|
|
# CI lacks, so its boot/render check is local-only.
|
|
run: npm run smoke
|
|
|
|
- name: Cache Playwright browsers
|
|
uses: actions/cache@v4
|
|
with:
|
|
path: ~/.cache/ms-playwright
|
|
key: playwright-${{ runner.os }}-${{ hashFiles('clients/web/package-lock.json') }}
|
|
|
|
- name: Install Playwright browsers
|
|
working-directory: ./clients/web
|
|
run: npx playwright install --with-deps chromium
|
|
|
|
- name: Run Storybook play-function tests
|
|
working-directory: ./clients/web
|
|
run: npm run test:storybook
|