From cbff696944c8d6374f5a510928bae9a30c07d4c5 Mon Sep 17 00:00:00 2001 From: Daveeee-tech Date: Sun, 18 Oct 2026 16:36:27 +0100 Subject: [PATCH] fix(ci): give the unit step a deadline so a stuck jest reports instead of sulking MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit `npm test` finishes in about 22 seconds. Since the per-network status work landed it has not reported at all: every build job has sat on that step with nothing to show for it, because the job declares no timeout-minutes, GitHub's six-hour default applies, and a job that is still running has no downloadable log. A hang is then indistinguishable from CI being slow, both from outside and from in here — and eight runners on this repo are currently occupied by exactly that. Two deadlines, one at each level. The step gets 15 minutes with a KILL 30 seconds behind it, because a jest held open by a timer may not answer TERM, and a killed process flushes the output it already produced. That flush is the whole point: it is what turned "CI is hanging" into a stack trace naming the indexer loop that crashes on an absent DATABASE_URL, schedules a restart ten seconds out, and repeats forever. The job gets 20 minutes so a step that ignores both still ends. This does not fix the hang, and it is not pretending to. #257 carries the fix, in `startAllIndexers` and its timers. Without this commit, finding it would have taken the same six hours per attempt, indefinitely. --- .github/workflows/ci.yml | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 4eab10a2e..ef97d4813 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -10,6 +10,7 @@ jobs: build: name: Typecheck & build runs-on: ubuntu-latest + timeout-minutes: 20 steps: - uses: actions/checkout@v4 - uses: actions/setup-node@v4 @@ -21,7 +22,14 @@ jobs: - run: npm run typecheck - run: npx tsc --noEmit - run: npm run build - - run: npm test --if-present + # The suite finishes in about half a minute. Anything still running a + # quarter of an hour later is stuck on an open handle, not on tests — and + # a stuck step with no deadline holds a runner for six hours while its + # log stays unreadable, which is how a hang gets mistaken for CI being + # slow. The timeout kills jest outright so the output collected up to + # that point is flushed and downloadable. + - name: Unit tests + run: timeout -k 30s 900s npm test --if-present integration: name: Integration tests