ci: boot check on port 3100 and stop it before Playwright needs 3000

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
Anthony Ettinger 2026-10-01 15:00:42 +00:00
parent d5252fb167
commit de96119b1f

View file

@ -47,14 +47,17 @@ jobs:
run: bun run test:contract
- name: The site serves under Bun
# Port 3100 and stopped afterwards: Playwright's webServer below needs 3000.
run: |
(PORT=3000 bun run start > /tmp/web.log 2>&1 &)
cd apps/logicsrc-web
PORT=3100 bun --bun ../../node_modules/next/dist/bin/next start > /tmp/web.log 2>&1 &
pid=$!
for i in $(seq 1 60); do
code=$(curl -s -o /dev/null -w '%{http_code}' http://127.0.0.1:3000/ || true)
[ "$code" = 200 ] && { echo "/ -> $code"; exit 0; }
code=$(curl -s -o /dev/null -w '%{http_code}' http://127.0.0.1:3100/ || true)
if [ "$code" = 200 ]; then echo "/ -> $code"; kill "$pid"; exit 0; fi
sleep 1
done
cat /tmp/web.log; exit 1
cat /tmp/web.log; kill "$pid" || true; exit 1
- name: Install Playwright browsers
run: bunx playwright install --with-deps chromium