Skip to content

Local code intelligence for developers and AI agents. Connect code, docs and infrastructure in a persistent graph, with CBM Lens, MCP tools, agent integrations and change-aware test selection.

ci(ui): the CodeAtlasWeb leg is one canonical script, here and in CI

Martin Vogel453d6cc9bc03
diff --git a/.github/workflows/_test.yml b/.github/workflows/_test.yml
index 497773163..89ef01a91 100644
--- a/.github/workflows/_test.yml
+++ b/.github/workflows/_test.yml
@@ -205,19 +205,18 @@ jobs:
shell: bash
run: scripts/ci/test-package-wrappers.sh
- # CodeAtlasWeb (graph-ui) gates. The frontend's own vitest suite (2000+
+ # CodeAtlasWeb (graph-ui) leg: the frontend's own vitest suite (2000+
# tests; the render tests run under jsdom), its hardcoded-string and
- # promise scans, its frozen acceptance checks, and a production build with
- # the same npm ci the product build runs. No browser is downloaded: the
- # browser proofs (graph-ui/tools/smoke-*.mjs) need a running server and
- # Playwright browsers, and they stay a local, manually dispatched venue
- # documented in graph-ui/README.md rather than a hosted gate.
+ # promise scans, its portable frozen acceptance checks, and a production
+ # build with the same npm ci the product build runs. One canonical script
+ # (scripts/ci/test-ui.sh) is the whole leg, here and locally. No browser
+ # is downloaded: the browser proofs (graph-ui/tools/smoke-*.mjs) need a
+ # running server and Playwright browsers, and they stay a local, manually
+ # dispatched venue documented in graph-ui/README.md rather than a hosted
+ # gate.
test-ui:
runs-on: ubuntu-latest
timeout-minutes: 20
- defaults:
- run:
- working-directory: graph-ui
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
@@ -225,28 +224,8 @@ jobs:
with:
node-version: "22"
- - name: Install (no browser download)
- env:
- PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD: "1"
- run: npm ci
-
- - name: Unit tests (vitest)
- run: npm run test:unit
-
- - name: Style and promise gates
- run: |
- npm run check:style
- npm run check:promises
-
- # The two release-binding files (release-current, release-proof-binding)
- # tie the recorded release report to the commits of the frontend's
- # original repository and cannot pass anywhere else; test:acceptance is
- # every other frozen check.
- - name: Frozen acceptance checks
- run: npm run test:acceptance
-
- - name: Build
- run: npm run build
+ - name: CodeAtlasWeb leg (install, unit, style, promises, acceptance, build)
+ run: scripts/ci/test-ui.sh
# ThreadSanitizer data-race gate. The threaded production surfaces (watcher,
# subprocess, httpd, pipeline, mcp, worker pool, diagnostics, the runnable
diff --git a/graph-ui/README.md b/graph-ui/README.md
index 20cea913e..acf074a17 100644
--- a/graph-ui/README.md
+++ b/graph-ui/README.md
@@ -20,9 +20,11 @@ What the maintainers added on top:
check or remove an index, edit the decision record, read the server's
processes and log. It is the one surface that asks the server to write,
and it names every route it uses.
-- **Gates in CI** (`.github/workflows/_test.yml`, job `test-ui`):
- `npm run test:unit`, `npm run check:style`, `npm run check:promises`,
- `npm run test:acceptance` and `npm run build`. `test:acceptance` is
+- **Gates in CI** (`.github/workflows/_test.yml`, job `test-ui`, which
+ runs `scripts/ci/test-ui.sh`; run that script locally for the identical
+ leg): `npm run test:unit`, `npm run check:style`,
+ `npm run check:promises`, `npm run test:acceptance` and
+ `npm run build`. `test:acceptance` is
every frozen check except the two release-binding files
(`release-current`, `release-proof-binding`), which tie the recorded
release report to the commits of the original repository and cannot
diff --git a/scripts/ci/test-ui.sh b/scripts/ci/test-ui.sh
new file mode 100644
index 000000000..54043cde2
--- /dev/null
+++ b/scripts/ci/test-ui.sh
@@ -0,0 +1,43 @@
+#!/usr/bin/env bash
+# The CodeAtlasWeb (graph-ui) leg: one script, every venue.
+#
+# CI's `test-ui` job calls exactly this, and so does anyone checking the
+# frontend locally, so a green here means the same thing in both places:
+#
+# 1. npm ci with the same browser-download skip the product build uses
+# (the dev dependencies include playwright for the frontend's local
+# browser proofs; nothing in this leg launches a browser);
+# 2. the frontend's vitest suite (render tests under jsdom);
+# 3. its hardcoded-string scan and its promise scan;
+# 4. its portable frozen acceptance checks (`test:acceptance`: every
+# frozen check except the two release-binding files, which tie the
+# recorded release report to the commits of the frontend's original
+# repository and cannot pass anywhere else);
+# 5. a production build, the one the product embeds.
+#
+# Usage: scripts/ci/test-ui.sh (from the repository root or anywhere)
+
+set -euo pipefail
+
+ROOT="$(cd "$(dirname "$0")/../.." && pwd)"
+cd "$ROOT/graph-ui"
+
+echo "=== test-ui: install (no browser download) ==="
+PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD=1 npm ci
+
+echo "=== test-ui: unit tests (vitest) ==="
+npm run test:unit
+
+echo "=== test-ui: style gate ==="
+npm run check:style
+
+echo "=== test-ui: promise scan ==="
+npm run check:promises
+
+echo "=== test-ui: frozen acceptance checks (portable set) ==="
+npm run test:acceptance
+
+echo "=== test-ui: production build ==="
+npm run build
+
+echo "=== test-ui: green ==="