blob: 1442ebf852efdc10b01e8a4e50587cd971c67655 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
|
#!/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"
|