fix(ci): bump coverage heap budget + Windows npm timeout in runNpm helper (#3704)

Set NODE_OPTIONS=--max-old-space-size=6144 on the Unit coverage step so the
c8 report phase has 6 GB instead of Node's default ~4 GB heap; the Linux
Node 24 runner has 7 GB available so this leaves 1 GB headroom. Raise the
runNpm default timeout from 55 000 ms to 180 000 ms so cold-cache Windows
npm install -g runs (which take 60-90 s on NTFS + Defender) complete before
the child process is killed.

Refs #3703

Co-authored-by: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
Tom Boucher
2026-05-18 14:14:52 -04:00
committed by GitHub
parent 463eb26544
commit f1a61620bc
2 changed files with 3 additions and 1 deletions

View File

@@ -219,6 +219,8 @@ jobs:
run: npm run build:sdk
- name: Unit coverage
shell: bash
env:
NODE_OPTIONS: --max-old-space-size=6144
run: npm run test:coverage:unit
- name: Upload coverage artifact
if: always()

View File

@@ -250,7 +250,7 @@ function runNpm(args, options = {}) {
const defaults = {
encoding: 'utf-8',
shell: isWindows,
timeout: 55000,
timeout: 180000,
};
return execFileSync(npmCmd, args, { ...defaults, ...options }).trim();
}