Description
The pages-ci.yml workflow currently runs lint, typecheck, build, and bundle size checks — but never verifies that the build output can actually be served and accessed. Since pages/ is a React SPA (React Router v6 + webpack), a broken HTML template or missing bundle reference would slip through undetected.
We should add a lightweight smoke test step that starts a static file server against dist/ and verifies key routes return HTTP 200 with valid bundle references.
Scope
- File(s):
.github/workflows/pages-ci.yml, pages/package.json
- Area: Pages CI pipeline
Proposed Approach
- Add
serve to pages/package.json devDependencies (avoids npx download on every run).
- After the existing
Build step in pages-ci.yml, add a smoke test step:
- name: Smoke test
working-directory: pages
run: |
npx serve dist -s -l tcp://127.0.0.1:3999 &
SERVER_PID=$!
sleep 2
FAILED=0
for path in "/" "/docs/contributing" "/docs/quickstart" "/features"; do
BODY=$(curl -sf "http://127.0.0.1:3999${path}")
if [ $? -ne 0 ]; then
echo "FAIL: ${path} — not reachable"
FAILED=1
elif ! echo "$BODY" | grep -q '\.bundle\.js'; then
echo "FAIL: ${path} — missing bundle reference"
FAILED=1
else
echo "OK: ${path}"
fi
done
kill $SERVER_PID
exit $FAILED
Key details:
- Uses
serve -s (SPA mode) to fallback all routes to index.html, matching real deployment behavior.
- Checks that responses contain
.bundle.js references to confirm the build artifact is complete.
- Runs inside the existing
node:24.18.0 container — no additional dependencies or browser binaries needed.
- Estimated added time: ~3 seconds (server start + curl checks).
Acceptance Criteria
Context
Discovered while adding documentation changes to pages/src/content/docs/ — realized there's no validation that the built site is actually servable. This is a lightweight alternative to full browser-based testing (Playwright) that avoids ~400MB browser binary downloads on the self-hosted runner.
Description
The
pages-ci.ymlworkflow currently runs lint, typecheck, build, and bundle size checks — but never verifies that the build output can actually be served and accessed. Sincepages/is a React SPA (React Router v6 + webpack), a broken HTML template or missing bundle reference would slip through undetected.We should add a lightweight smoke test step that starts a static file server against
dist/and verifies key routes return HTTP 200 with valid bundle references.Scope
.github/workflows/pages-ci.yml,pages/package.jsonProposed Approach
servetopages/package.jsondevDependencies (avoidsnpxdownload on every run).Buildstep inpages-ci.yml, add a smoke test step:Key details:
serve -s(SPA mode) to fallback all routes toindex.html, matching real deployment behavior..bundle.jsreferences to confirm the build artifact is complete.node:24.18.0container — no additional dependencies or browser binaries needed.Acceptance Criteria
serveadded topages/package.jsondevDependenciespages-ci.ymlafter the Build step/,/docs/contributing,/docs/quickstart,/featuresare checkedpages/Context
Discovered while adding documentation changes to
pages/src/content/docs/— realized there's no validation that the built site is actually servable. This is a lightweight alternative to full browser-based testing (Playwright) that avoids ~400MB browser binary downloads on the self-hosted runner.