ci: bound the test workflow runtime - #102
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Closing this in favor of #103, which is the actual fix. Diagnosis: CI has been red because a single lifecycle hook times out — the This PR ( #103 fixes it by making the teardown bounded (race |
…103) The `.md suffix end-to-end` suite boots `next dev --turbopack` via `bunx` and tears it down with `server.kill(); await server.exited`. `kill()` only SIGTERMs the direct bunx child; the next-server/Turbopack grandchildren survive, so `.exited` never resolves and afterAll blocks until Bun's setDefaultTimeout(120000) -- failing the file and turning CI red on every run since PR #97 (the fragility was latent since the teardown landed in PR #81). PR #102 (timeout-minutes: 30) does not help: that bounds the GitHub job timeout, but the job finishes in ~3-6 min and the 120s is Bun's per-hook timeout, a different layer. Spawn the dev server detached so it leads its own process group, then tear the whole group down: SIGTERM, race `.exited` against a 3s budget, escalate to SIGKILL if it hasn't exited. The awaited exit is now bounded, so teardown can no longer hang regardless of how the child handles SIGTERM -- and the full tree is reaped, keeping the port/CPU free for the later Chromium tests. Validated: bun run typecheck, biome check, and bun test tests/e2e/llm-endpoints.test.ts (22 pass). Co-authored-by: Claude <noreply@anthropic.com>
What changed
Add
timeout-minutes: 30to the existing CI job.Why
This bounds a stalled runner or runtime well below the six-hour GitHub Actions default. Recent successful jobs finish in roughly 2–10 minutes, so the ceiling leaves ample headroom.
Scope
This is exactly one workflow line. No test command, timeout,
Bun.spawnSynchelper, retry, or output handling changed.Validation
.github/workflows/ci.ymland confirmedjobs.lint.timeout-minutesis numeric30git diff --check