Skip to content

test(tui): raise App.tsx branch coverage >90 and de-flake coverage ru… #3531

test(tui): raise App.tsx branch coverage >90 and de-flake coverage ru…

test(tui): raise App.tsx branch coverage >90 and de-flake coverage ru… #3531

Workflow file for this run

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: '20.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