Files
worldwideview/.github/workflows/playwright.yml
Silvertakana e9a908840d fix(cli): polling plugins with --yes no longer require --seeder-tier (#210)
The --yes guard counted the conditionally-skipped seederTier prompt as a
missing required value, so `create <id> --architecture polling ... --yes`
failed even though seeders only apply to websocket plugins. The guard now
only requires seederTier when the resolved architecture is websocket.

This bug shipped in 1.3.0 and was missed in manual UAT (the polling case
was exercised interactively, not with --yes). The new test suite caught it.

Also in this change:
- Add packages/wwv-cli/test/create.test.mjs: 9 integration tests that spawn
  the built CLI into temp dirs and assert the scaffolded tree (polling vs
  websocket, community vs private seeder tier, billboard/model/point render,
  --core, kebab-id naming, icon mapping, and the --yes / invalid-flag /
  duplicate-dir failure guards). Uses Node's built-in test runner, no new deps.
- Add .github/workflows/cli.yml: path-scoped to packages/wwv-cli, runs
  build (tsc) + the integration tests. Fast versus the full app suite.
- Add paths-ignore for packages/wwv-cli to the heavy app workflows (ci,
  playwright, docker-publish, test-setup-scripts, test-local-dev push) so a
  CLI-only change runs just cli.yml instead of the whole suite.
- Bump CLI to 1.3.1 and add a test script.
2026-05-29 20:08:42 +12:00

62 lines
1.6 KiB
YAML

name: Playwright Tests
# CLI-only changes are covered by cli.yml; skip browser E2E for them.
on:
push:
branches: [ main, master ]
paths-ignore:
- "packages/wwv-cli/**"
pull_request:
branches: [ main, master ]
paths-ignore:
- "packages/wwv-cli/**"
permissions:
contents: read
jobs:
test:
timeout-minutes: 60
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
browser: [chromium, firefox, webkit]
steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v3
with:
version: 9.15.4
- uses: actions/setup-node@v4
with:
node-version: 20
cache: 'pnpm'
- name: Install dependencies
run: pnpm install
- name: Install Playwright Browsers
run: pnpm exec playwright install --with-deps
- name: Run Project Setup
run: pnpm run setup
- name: Boot Database
run: |
docker network create coolify || true
pnpm run predev
- name: Run Playwright tests
env:
# Prevent Firefox from loading the AT-SPI/MSAA accessibility bridge on
# Linux CI — without this, Firefox hangs for ~20 min waiting for a bus
# that doesn't exist on ubuntu-latest runners.
NO_AT_BRIDGE: ${{ matrix.browser == 'firefox' && '1' || '0' }}
run: pnpm test:e2e --project=${{ matrix.browser }}
- uses: actions/upload-artifact@v4
if: ${{ !cancelled() }}
with:
name: playwright-report-${{ matrix.browser }}
path: playwright-report/
retention-days: 30