mirror of
https://github.com/bitwarden/clients.git
synced 2026-06-04 21:04:29 +08:00
[BEEEP] [PM-37492] Make jest tests faster
This commit is contained in:
parent
d24baa04b5
commit
7574d3859b
2
.github/workflows/test.yml
vendored
2
.github/workflows/test.yml
vendored
@ -119,7 +119,7 @@ jobs:
|
||||
# maxWorkers is a workaround for a memory leak that crashes tests in CI:
|
||||
# https://github.com/facebook/jest/issues/9430#issuecomment-1149882002
|
||||
# Reduced to 2 workers and split tests across parallel jobs to prevent OOM kills
|
||||
run: npm test -- ${{ matrix.test-group.paths }} --coverage --maxWorkers=2
|
||||
run: npm test -- ${{ matrix.test-group.paths }} --coverage --maxWorkers=2 --workerIdleMemoryLimit=1500MiB
|
||||
env:
|
||||
JEST_JUNIT_OUTPUT_NAME: ${{ matrix.test-group.junit }}
|
||||
|
||||
|
||||
@ -71,5 +71,6 @@ module.exports = {
|
||||
// Workaround for a memory leak that crashes tests in CI:
|
||||
// https://github.com/facebook/jest/issues/9430#issuecomment-1149882002
|
||||
// Also anecdotally improves performance when run locally
|
||||
maxWorkers: 3,
|
||||
maxWorkers: 8,
|
||||
workerIdleMemoryLimit: "1500MiB",
|
||||
};
|
||||
|
||||
@ -7,7 +7,8 @@ module.exports = {
|
||||
// Workaround for a memory leak that crashes tests in CI:
|
||||
// https://github.com/facebook/jest/issues/9430#issuecomment-1149882002
|
||||
// Also anecdotally improves performance when run locally
|
||||
maxWorkers: 3,
|
||||
maxWorkers: 8,
|
||||
workerIdleMemoryLimit: "1500MiB",
|
||||
|
||||
setupFiles: ["<rootDir>/../../libs/shared/polyfill-node-globals.ts"],
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user