Skip to content

Commit 27b7872

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: 66fe7f0dbcc3207a6b8ca8fff65162baf22148d9 Pull Request resolved: #30033
1 parent d0a70b6 commit 27b7872

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

Diff for: .circleci/config.yml

+1-1
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

Diff for: .github/workflows/runtime_test.yml

+1-1
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

Diff for: scripts/jest/jest-cli.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -91,8 +91,8 @@ const argv = yargs
9191
ci: {
9292
describe: 'Run tests in CI',
9393
requiresArg: false,
94-
type: 'boolean',
95-
default: false,
94+
type: 'choices',
95+
choices: ['circleci', 'github'],
9696
},
9797
compactConsole: {
9898
alias: 'c',
@@ -309,7 +309,7 @@ function getCommandArgs() {
309309
}
310310

311311
// CI Environments have limited workers.
312-
if (argv.ci) {
312+
if (argv.ci === 'circleci') {
313313
args.push('--maxWorkers=2');
314314
}
315315

0 commit comments

Comments
 (0)