ci(gitea): kill leftover webServer process and cap job at 25min
All checks were successful
Caterium QA / qa (push) Successful in 17m29s

Playwright's webServer (http-server) wasn't exiting after the e2e
step, holding stdout open and hanging Gitea's Complete job step
indefinitely (observed run #13 stuck past 6 minutes with no progress).
Add an explicit cleanup step plus a job-level timeout as a backstop.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
pavlov346346-source 2026-09-24 04:06:44 +03:00
parent 01fa5aef7f
commit 9bee2e4adc

View File

@ -8,6 +8,10 @@ concurrency:
jobs:
qa:
runs-on: ubuntu-latest
# Belt-and-braces cap on the whole job. Without it, a step whose
# background process doesn't exit cleanly (see the e2e step below) can
# hang "Complete job" indefinitely instead of just failing the step.
timeout-minutes: 25
env:
# registry.npmjs.org sits behind Cloudflare IPs that this self-hosted
# runner cannot reach (times out on both IPv4 and IPv6). npmmirror.com
@ -88,3 +92,16 @@ jobs:
continue-on-error: true
timeout-minutes: 15
run: npx playwright test --config=tests/playwright.config.mjs --project=desktop --workers=1
- name: Stop leftover webServer process
# Playwright's `webServer` (npx http-server, started for the e2e step
# above) is meant to be killed automatically once the test run ends,
# but in this runner's container it has been staying alive and
# holding the step's stdout open, which hangs Gitea's "Complete job"
# indefinitely instead of finishing normally. Killing anything still
# listening on the webServer's port (4173) clears that up. if: always()
# so this runs even if the e2e step above timed out or failed.
if: always()
run: |
pkill -f "http-server public" || true
fuser -k 4173/tcp 2>/dev/null || true
exit 0