diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 4d8fe328..a0ce58a4 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -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