perf(cli): skip native-binary build tests by default
The build-exe and build-exe-cross suites invoke `bun build` in beforeAll hooks and pegged CPU for ~6 min on every test run (one cached-on-miss build plus three unconditional cross-target builds). Move them to a dedicated vitest project, skip them unless CI=1 or FUSION_TEST_BUILD_EXE=1 is set, and add cache guards so CI re-runs skip rebuilds when the target binary already exists. With build-exe out of the default cli run, the main config can enable fileParallelism. Run on demand via `pnpm --filter @runfusion/fusion test:build-exe`. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -23,6 +23,10 @@ export default defineConfig({
|
||||
},
|
||||
test: {
|
||||
include: ["src/**/*.test.ts"],
|
||||
// build-exe + build-exe-cross live in their own vitest project
|
||||
// (see vitest.build-exe.config.ts) so the rest of the CLI suite can
|
||||
// run with file parallelism enabled.
|
||||
exclude: ["**/node_modules/**", "**/dist/**", "src/__tests__/build-exe*.test.ts"],
|
||||
setupFiles: [
|
||||
"./src/__tests__/setup-test-isolation.ts",
|
||||
resolve(__dirname, "../core/src/__test-utils__/vitest-setup.ts"),
|
||||
@@ -30,9 +34,7 @@ export default defineConfig({
|
||||
globalSetup: [resolve(__dirname, "../core/src/__test-utils__/vitest-teardown.ts")],
|
||||
maxWorkers,
|
||||
poolOptions: { threads: { minThreads: 1, maxThreads: maxWorkers }, forks: { minForks: 1, maxForks: maxWorkers } },
|
||||
// build-exe and build-exe-cross suites both operate on packages/cli/dist/
|
||||
// and can race when run in parallel workers.
|
||||
fileParallelism: false,
|
||||
fileParallelism: true,
|
||||
coverage: {
|
||||
enabled: false,
|
||||
reporter: ["text", "html", "json"],
|
||||
|
||||
Reference in New Issue
Block a user