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.
37 lines
1.0 KiB
YAML
37 lines
1.0 KiB
YAML
name: CLI
|
|
|
|
# Scoped to the plugin CLI package only. Heavy app workflows (ci.yml,
|
|
# playwright.yml, docker-publish.yml, ...) exclude this path, so a CLI-only
|
|
# change runs just this fast build + test instead of the full suite.
|
|
on:
|
|
push:
|
|
branches: [main]
|
|
paths:
|
|
- "packages/wwv-cli/**"
|
|
- ".github/workflows/cli.yml"
|
|
pull_request:
|
|
branches: [main]
|
|
paths:
|
|
- "packages/wwv-cli/**"
|
|
- ".github/workflows/cli.yml"
|
|
|
|
permissions:
|
|
contents: read
|
|
|
|
jobs:
|
|
build-and-test:
|
|
name: Build & Test CLI
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v6
|
|
- uses: pnpm/action-setup@v6
|
|
- uses: actions/setup-node@v6
|
|
with:
|
|
node-version: 22
|
|
cache: pnpm
|
|
- run: pnpm install --frozen-lockfile
|
|
# `build` runs tsc — this also type-checks the CLI source.
|
|
- run: pnpm --filter @worldwideview/wwv-cli build
|
|
# Integration tests spawn the built CLI and assert the scaffolded tree.
|
|
- run: pnpm --filter @worldwideview/wwv-cli test
|