* ci(storybook): wire test:storybook into CI (#1251) - Add test:storybook:watch to clients/web for interactive iteration; the one-shot script already existed. - Surface test:storybook at the repo root, delegating to the web client. - Add a separate CI step that installs the Playwright Chromium binary and runs the storybook play-function suite after validate. Kept out of validate because the suite needs a real browser and is ~10s slower than the unit tests. - Document the new pre-push step in AGENTS.md. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> * ci(storybook): cache Playwright browsers + tighten AGENTS wording Cache the Chromium binary keyed on clients/web/package-lock.json so the ~150MB download is a no-op on CI cache hits. Also clarify that CI runs test:storybook after the unit/lint/build checks (not literal `validate`, which is a local-only script). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
54 lines
1.4 KiB
YAML
54 lines
1.4 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: '20.x'
|
|
cache: 'npm'
|
|
|
|
- name: Install root dependencies
|
|
run: npm install
|
|
|
|
- name: Install web client dependencies
|
|
working-directory: ./clients/web
|
|
run: npm install
|
|
|
|
- name: Check formatting
|
|
working-directory: ./clients/web
|
|
run: npm run format:check
|
|
|
|
- name: Run linter
|
|
working-directory: ./clients/web
|
|
run: npm run lint
|
|
|
|
- name: Run Build
|
|
working-directory: ./clients/web
|
|
run: npm run build
|
|
|
|
- name: Run tests with coverage
|
|
working-directory: ./clients/web
|
|
run: npm run test:coverage
|
|
|
|
- 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
|