diff options
Diffstat (limited to 'scripts/ci.sh')
| -rwxr-xr-x | scripts/ci.sh | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/scripts/ci.sh b/scripts/ci.sh index 7115f60..1442ebf 100755 --- a/scripts/ci.sh +++ b/scripts/ci.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash # CI for X-Haven web: analyze + test the Dart server, typecheck + test + build -# the Svelte web app. +# the Svelte web app, and (when PLAYWRIGHT is set) run the Playwright E2E suite. set -euo pipefail cd "$(dirname "$0")/.." @@ -19,4 +19,15 @@ echo "==> web: tests" 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" |
