Skip to content

Commit 7d04c62

Browse files
committed
ci: log heap usage and recycle jest workers
1 parent d46964d commit 7d04c62

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

jest.config.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@ module.exports = {
1919
'node_modules/(?!(@octokit|@actions|@kie|@probelabs|open)/)',
2020
],
2121
setupFilesAfterEnv: ['<rootDir>/tests/setup.ts'],
22+
// Log per-test heap usage in CI (or when explicitly enabled)
23+
logHeapUsage: process.env.CI === 'true' || process.env.VISOR_LOG_HEAP === 'true',
2224
testTimeout: 10000, // Reduced from 30s to 10s for faster CI
2325
// Prevent Jest from hanging on async operations
2426
forceExit: true,
@@ -28,5 +30,5 @@ module.exports = {
2830
// Use child processes on CI for better memory reclamation
2931
workerThreads: process.env.CI ? false : true,
3032
// Recycle workers if they retain too much memory
31-
workerIdleMemoryLimit: process.env.CI ? '512MB' : undefined,
33+
workerIdleMemoryLimit: process.env.CI ? '256MB' : undefined,
3234
};

0 commit comments

Comments
 (0)