Skip to content

Commit

Permalink
Dev: Run tests on all CPU cores on CI
Browse files Browse the repository at this point in the history
  • Loading branch information
overlookmotel committed Dec 19, 2023
1 parent 6081dde commit f14099e
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion jest.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,8 @@ module.exports = {
testEnvironment: 'node',
coverageDirectory: 'coverage',
collectCoverageFrom: ['index.js', 'lib/**/*.js'],
setupFilesAfterEnv: ['jest-extended/all']
setupFilesAfterEnv: ['jest-extended/all'],
// Jest by default uses a number of workers equal to number of CPU cores minus 1.
// Github Actions runners provide 2 cores and running with 2 workers is faster than 1.
...(process.env.CI && {maxWorkers: '100%'})
};

0 comments on commit f14099e

Please sign in to comment.