codeburn/.github/workflows/tests.yml
iamtoruk 5130041839 ci: give the quarantined lock suite its own timeout
The step is continue-on-error, but when it stalls it runs into the job's
15-minute budget and the whole job is reported cancelled, hiding the
parallel suite's result (#1040 three times in a row).
2026-08-19 13:35:35 -07:00

46 lines
1.8 KiB
YAML

name: Tests
on:
pull_request:
push:
branches: [main]
jobs:
test:
runs-on: ubuntu-latest
timeout-minutes: 15
strategy:
fail-fast: false
matrix:
# Package floor, and the newest 22.x so paths gated on later node:zlib
# features (zstd, 22.15+) get exercised.
node-version: [22.13.0, 22]
steps:
- uses: actions/checkout@v6
- uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: npm
- run: npm ci
- name: Typecheck
run: npx tsc --noEmit
# The cache-refresh-lock files exercise a cross-process file lock and are
# parallelism-sensitive (they fail under full worker pressure and pass serially -
# reproduced repeatedly on unmodified main), so they run in their own serial step
# below instead of making every PR roll dice.
# Scoping (tests/ only, app/ excluded) lives in the package.json test
# script since #948, so CI and a contributor's `npm test` can never drift.
- name: Test suite (parallel)
run: npm test
# Single forked worker, so lock contention comes only from the child processes the
# tests spawn deliberately. Quarantined (reports, never gates): the process
# suite still races its own takeover window even serially on slow runners -
# tracked in #904; drop continue-on-error once that race is settled.
# Step-level timeout so a stalled lock suite fails soft here instead of
# tripping the job's 15-minute budget, which kills the whole job as
# "cancelled" and hides the parallel suite's green result.
- name: Cache-lock suite (serial, quarantined)
continue-on-error: true
timeout-minutes: 5
run: npm run test:locks