mirror of
https://github.com/profullstack/logicsrc.git
synced 2026-12-01 01:14:47 +00:00
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:
parent
d5252fb167
commit
de96119b1f
1 changed files with 7 additions and 4 deletions
11
.github/workflows/ci.yml
vendored
11
.github/workflows/ci.yml
vendored
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue