velxio/.github
davidmonterocrespo24 1f23066f47 fix(tests): migrate forks config to vitest-4 top-level + restore NODE_OPTIONS
Two issues in PR #200 became obvious from the next CI run:

1. **`poolOptions.forks.execArgv` had no effect.** Vitest 4 removed
   `test.poolOptions` entirely — every key under it moved to
   top-level `test.*`. The runner emits this banner on every run:

       DEPRECATED `test.poolOptions` was removed in Vitest 4.
       All previous poolOptions are now top-level options.

   So `test.poolOptions.forks.execArgv: ['--max-old-space-size=8192']`
   was silently ignored. Move it to `test.forks.execArgv` (and
   `test.forks.singleFork`).

2. **NODE_OPTIONS got dropped when the shard step was rewritten.**
   PR #199 added `env: NODE_OPTIONS: --max-old-space-size=8192` to
   the `npm test` step; PR #200 replaced the step with `npx vitest
   run --shard X/2` but did not carry the env-var across. Combined
   with #1, the workers reverted to Node's 4 GB default and shard 2
   (58 files) still OOMs at exactly 4128 MB heap.

Restore NODE_OPTIONS on the workflow step as belt-and-braces — it
gets honored by the parent vitest process, and the migrated config
covers the forked children.

With 8 GB heap × 2 shards × 58 files each, the cumulative state
from ngspice WASM + singletons fits comfortably and the suite
should exit cleanly.
2026-05-19 18:09:34 +02:00
..
workflows fix(tests): migrate forks config to vitest-4 top-level + restore NODE_OPTIONS 2026-05-19 18:09:34 +02:00
FUNDING.yml