chore(ci): capture server stderr + dump on failure
Backgrounding 'node .output/server/index.mjs &' swallowed startup crashes — failures presented as a useless 30s 'Wait for server' timeout. Pipe stderr to a log file and cat it on failure so the next crash is one click away.
This commit is contained in:
parent
9ddb45c4d8
commit
d1b5107478
1 changed files with 8 additions and 2 deletions
|
|
@ -44,11 +44,14 @@ jobs:
|
|||
- run: npx playwright install --with-deps chromium
|
||||
- run: npm run build
|
||||
- name: Start server
|
||||
run: node .output/server/index.mjs &
|
||||
run: node .output/server/index.mjs > /tmp/server.log 2>&1 &
|
||||
env:
|
||||
PORT: 3000
|
||||
- name: Wait for server
|
||||
run: timeout 30 sh -c 'until curl -sf http://localhost:3000; do sleep 1; done'
|
||||
- name: Server log on failure
|
||||
if: failure()
|
||||
run: cat /tmp/server.log || true
|
||||
- run: npx playwright test --ignore-snapshots
|
||||
- uses: actions/upload-artifact@v4
|
||||
if: failure()
|
||||
|
|
@ -98,11 +101,14 @@ jobs:
|
|||
- run: npx playwright install --with-deps chromium
|
||||
- run: npm run build
|
||||
- name: Start server
|
||||
run: node .output/server/index.mjs &
|
||||
run: node .output/server/index.mjs > /tmp/server.log 2>&1 &
|
||||
env:
|
||||
PORT: 3000
|
||||
- name: Wait for server
|
||||
run: timeout 30 sh -c 'until curl -sf http://localhost:3000; do sleep 1; done'
|
||||
- name: Server log on failure
|
||||
if: failure()
|
||||
run: cat /tmp/server.log || true
|
||||
- run: npx playwright test e2e/visual/
|
||||
- uses: actions/upload-artifact@v4
|
||||
if: failure()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue