Skip to content

Commit f0cb46d

Browse files
committed
[ci] Remove jest maxWorkers arg when running in github action
Changes the `ci` argument to be an enum instead so the tests use all available workers in GitHub actions ghstack-source-id: 6ba49cc Pull Request resolved: #30033
1 parent 84e9f7b commit f0cb46d

File tree

3 files changed

+5
-4
lines changed

3 files changed

+5
-4
lines changed

.circleci/config.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -368,7 +368,7 @@ jobs:
368368
steps:
369369
- checkout
370370
- setup_node_modules
371-
- run: yarn test <<parameters.args>> --ci
371+
- run: yarn test <<parameters.args>> --ci=circleci
372372

373373
yarn_test_build:
374374
docker: *docker

.github/workflows/runtime_test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,4 +52,4 @@ jobs:
5252
path: "**/node_modules"
5353
key: ${{ runner.arch }}-${{ runner.os }}-modules-${{ hashFiles('yarn.lock') }}
5454
- run: yarn install --frozen-lockfile
55-
- run: yarn test ${{ matrix.params }} --ci
55+
- run: yarn test ${{ matrix.params }} --ci=github

scripts/jest/jest-cli.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,8 @@ const argv = yargs
9191
ci: {
9292
describe: 'Run tests in CI',
9393
requiresArg: false,
94-
type: 'boolean',
94+
type: 'choices',
95+
choices: ['circleci', 'github'],
9596
default: false,
9697
},
9798
compactConsole: {
@@ -309,7 +310,7 @@ function getCommandArgs() {
309310
}
310311

311312
// CI Environments have limited workers.
312-
if (argv.ci) {
313+
if (argv.ci === 'circleci') {
313314
args.push('--maxWorkers=2');
314315
}
315316

0 commit comments

Comments
 (0)