Skip to content

Commit

Permalink
[ci] Remove jest maxWorkers arg when running in github action
Browse files Browse the repository at this point in the history
Changes the `ci` argument to be an enum instead so the tests use all
available workers in GitHub actions

ghstack-source-id: 66fe7f0dbcc3207a6b8ca8fff65162baf22148d9
Pull Request resolved: #30033
  • Loading branch information
poteto committed Jun 21, 2024
1 parent d0a70b6 commit 27b7872
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -368,7 +368,7 @@ jobs:
steps:
- checkout
- setup_node_modules
- run: yarn test <<parameters.args>> --ci
- run: yarn test <<parameters.args>> --ci=circleci

yarn_test_build:
docker: *docker
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/runtime_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,4 +52,4 @@ jobs:
path: "**/node_modules"
key: ${{ runner.arch }}-${{ runner.os }}-modules-${{ hashFiles('yarn.lock') }}
- run: yarn install --frozen-lockfile
- run: yarn test ${{ matrix.params }} --ci
- run: yarn test ${{ matrix.params }} --ci=github
6 changes: 3 additions & 3 deletions scripts/jest/jest-cli.js
Original file line number Diff line number Diff line change
Expand Up @@ -91,8 +91,8 @@ const argv = yargs
ci: {
describe: 'Run tests in CI',
requiresArg: false,
type: 'boolean',
default: false,
type: 'choices',
choices: ['circleci', 'github'],
},
compactConsole: {
alias: 'c',
Expand Down Expand Up @@ -309,7 +309,7 @@ function getCommandArgs() {
}

// CI Environments have limited workers.
if (argv.ci) {
if (argv.ci === 'circleci') {
args.push('--maxWorkers=2');
}

Expand Down

0 comments on commit 27b7872

Please sign in to comment.