Skip to content

Commit 9039500

Browse files
committed
perf: Optimize Jest configuration for CI stability
- Set maxWorkers to 50% to reduce memory pressure - Add workerIdleMemoryLimit of 512MB per worker - Set testTimeout to 30s for slow tests - Remove NODE_OPTIONS overrides (use Jest config instead) Fixes worker termination issues in CI while maintaining test reliability
1 parent 9ce2e8f commit 9039500

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

.github/workflows/ci.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,10 +32,10 @@ jobs:
3232
run: npm run build
3333

3434
- name: Run tests
35-
run: NODE_OPTIONS="--max_old_space_size=4096" npm test
35+
run: npm test
3636

3737
- name: Check test coverage
38-
run: NODE_OPTIONS="--max_old_space_size=4096" npm run test:coverage
38+
run: npm run test:coverage
3939

4040
- name: Upload coverage to Codecov
4141
if: matrix.node-version == '20.x'

jest.config.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,5 +17,8 @@ module.exports = {
1717
}
1818
},
1919
moduleFileExtensions: ['ts', 'js'],
20-
verbose: true
20+
verbose: true,
21+
maxWorkers: '50%',
22+
testTimeout: 30000,
23+
workerIdleMemoryLimit: '512MB'
2124
};

0 commit comments

Comments
 (0)