#!/usr/bin/env bash # CI for X-Haven web: analyze + test the Dart server, typecheck + test + build # the Svelte web app, and (when PLAYWRIGHT is set) run the Playwright E2E suite. set -euo pipefail cd "$(dirname "$0")/.." echo "==> server: dart analyze" (cd server && dart analyze) echo "==> server: dart test" (cd server && dart test) echo "==> web: typecheck" (cd web && npm run check) echo "==> web: tests" (cd web && npm run test) echo "==> web: build" (cd web && npm run build) # The E2E suite boots the real compiled server and drives real browser tabs, # so it needs web/dist (built above) + Playwright's Chromium. It's a slower # pass, so it runs only when PLAYWRIGHT is set (CI machines enable it; local # runs can opt in with `PLAYWRIGHT=1 scripts/ci.sh`). if [ -n "${PLAYWRIGHT:-}" ]; then echo "==> e2e: playwright install (chromium)" (cd e2e && npx playwright install chromium) echo "==> e2e: playwright test" (cd e2e && npm run test) fi echo "CI OK"