codeburn/.github/workflows/tests.yml
ozymandiashh 7909af1035 ci: quarantine the serial cache-lock step behind continue-on-error
Run #4 showed cache-refresh-lock-process racing its own takeover window
even in the serial single-fork step (#904). The enforced signal stays
the main suite; the lock suite reports without gating until the race
semantics are settled.
2026-08-04 03:56:20 +03:00

38 lines
1.6 KiB
YAML

name: Tests
on:
pull_request:
push:
branches: [main]
jobs:
test:
runs-on: ubuntu-latest
timeout-minutes: 15
steps:
- uses: actions/checkout@v6
- uses: actions/setup-node@v4
with:
node-version: 22.13.0
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.
# Scoped to tests/: the Electron app's renderer tests under app/ carry
# their own vitest config and jsdom dependency (app/node_modules) and
# cannot run from the root install - the root default glob picking them
# up is exactly what failed run #2 with ERR_MODULE_NOT_FOUND: jsdom.
- name: Test suite (parallel)
run: npx vitest run tests --exclude "tests/cache-refresh-lock*"
# 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.
- name: Cache-lock suite (serial, quarantined)
continue-on-error: true
run: npx vitest run tests/cache-refresh-lock.test.ts tests/cache-refresh-lock-corrupt-body.test.ts tests/cache-refresh-lock-process.test.ts --poolOptions.forks.singleFork=true