diff --git a/.circleci/config.yml b/.circleci/config.yml index 894e52fab609d..d50f491ab5085 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -368,7 +368,7 @@ jobs: steps: - checkout - setup_node_modules - - run: yarn test <> --ci + - run: yarn test <> --ci=circleci yarn_test_build: docker: *docker diff --git a/.github/workflows/runtime_test.yml b/.github/workflows/runtime_test.yml index 1acce045217ee..ce797cb4439ff 100644 --- a/.github/workflows/runtime_test.yml +++ b/.github/workflows/runtime_test.yml @@ -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 diff --git a/scripts/jest/jest-cli.js b/scripts/jest/jest-cli.js index 9c3be220fb645..edb506cd535aa 100644 --- a/scripts/jest/jest-cli.js +++ b/scripts/jest/jest-cli.js @@ -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', @@ -309,10 +309,14 @@ function getCommandArgs() { } // CI Environments have limited workers. - if (argv.ci) { + if (argv.ci === 'circleci') { args.push('--maxWorkers=2'); } + if (argv.ci === 'github') { + args.push('--maxConcurrency=10 --workerThreads=true'); + } + // Push the remaining args onto the command. // This will send args like `--watch` to Jest. args.push(...argv._);