ci: Update Jest setup on the CI to avoid OOM errors (no-changelog) (#5042)

This commit is contained in:
कारतोफ्फेलस्क्रिप्ट™ 2022-12-28 09:58:14 +01:00 committed by GitHub
parent 4daf905ce2
commit 11b75c02ea
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -11,7 +11,7 @@ const tsJestOptions = {
};
/** @type {import('jest').Config} */
module.exports = {
const config = {
verbose: true,
testEnvironment: 'node',
testRegex: '\\.(test|spec)\\.(js|ts)$',
@ -23,3 +23,10 @@ module.exports = {
'^@/(.*)$': '<rootDir>/src/$1',
},
};
if (process.env.CI === 'true') {
config.maxWorkers = 2;
config.workerIdleMemoryLimit = 2048;
}
module.exports = config;