Skip to content

Commit eb1fb55

Browse files
chore(dev): add local CI scripts to reproduce e2e with timeouts and pre/post port cleanup
1 parent 036f7aa commit eb1fb55

File tree

2 files changed

+54
-0
lines changed

2 files changed

+54
-0
lines changed
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
#!/usr/bin/env bash
2+
set -euo pipefail
3+
4+
ROOT_DIR=$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")"/../.. && pwd)
5+
cd "$ROOT_DIR"
6+
7+
echo "[local-ci] Killing known SSR ports before run…"
8+
node federated-css-react-ssr/scripts/kill-all-ports.cjs || true 2>/dev/null || true
9+
10+
echo "[local-ci] Sockets before run:"
11+
ss -ltnp || true
12+
13+
echo "[local-ci] Running federated-css-react-ssr Playwright tests with 12-minute timeout…"
14+
if command -v timeout >/dev/null 2>&1; then
15+
timeout 12m pnpm --dir federated-css-react-ssr exec playwright test --reporter=list || STATUS=$?
16+
else
17+
pnpm --dir federated-css-react-ssr exec playwright test --reporter=list || STATUS=$?
18+
fi
19+
20+
echo "[local-ci] Sockets after run:"
21+
ss -ltnp || true
22+
23+
echo "[local-ci] Killing SSR ports after run…"
24+
node federated-css-react-ssr/scripts/kill-all-ports.cjs || true 2>/dev/null || true
25+
26+
exit ${STATUS:-0}
27+
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
#!/usr/bin/env bash
2+
set -euo pipefail
3+
4+
ROOT_DIR=$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")"/../.. && pwd)
5+
cd "$ROOT_DIR"
6+
7+
echo "[local-ci] Killing known ports before run…"
8+
node federated-css/scripts/kill-all-ports.cjs || true
9+
10+
echo "[local-ci] Snapshot of listening sockets before run:"
11+
ss -ltnp || true
12+
13+
echo "[local-ci] Running federated-css Playwright tests with 9-minute timeout…"
14+
if command -v timeout >/dev/null 2>&1; then
15+
timeout 9m pnpm --dir federated-css exec playwright test --reporter=list || STATUS=$?
16+
else
17+
pnpm --dir federated-css exec playwright test --reporter=list || STATUS=$?
18+
fi
19+
20+
echo "[local-ci] Snapshot of listening sockets after run:"
21+
ss -ltnp || true
22+
23+
echo "[local-ci] Killing ports after run…"
24+
node federated-css/scripts/kill-all-ports.cjs || true
25+
26+
exit ${STATUS:-0}
27+

0 commit comments

Comments
 (0)