@samitouri / QOS-React / commits / 8ebe42f17c

[ci] Cleanup --ci flag

This can be restored back to being a boolean instead of an enum ghstack-source-id: aca58fb7ea386ee489dd895e028f1aa2fc507193 Pull Request resolved: https://github.com/facebook/react/pull/30508

Lauren Tan committed Jul 29, 2024 at 18:51 UTC 8ebe42f17c6ff525ee3887da9fc8ee5a9bd1a4aa
6 files changed +15 -20
.github/workflows/devtools_regression_tests.yml
+1 -1
@@ -123,7 +123,7 @@ jobs:
123 - name: Display structure of build
124 run: ls -R build
125 - run: ./scripts/ci/download_devtools_regression_build.js ${{ matrix.version }} --replaceBuild
126 - - run: node ./scripts/jest/jest-cli.js --build --project devtools --release-channel=experimental --reactVersion ${{ matrix.version }} --ci=github
126 + - run: node ./scripts/jest/jest-cli.js --build --project devtools --release-channel=experimental --reactVersion ${{ matrix.version }} --ci
127
128 run_devtools_e2e_tests_for_versions:
129 name: Run DevTools e2e tests for versions
.github/workflows/runtime_build_and_test.yml
+3 -3
@@ -141,7 +141,7 @@ jobs:
141 path: "**/node_modules"
142 key: ${{ runner.arch }}-${{ runner.os }}-modules-${{ hashFiles('yarn.lock') }}
143 - run: yarn install --frozen-lockfile
144 - - run: yarn test ${{ matrix.params }} --ci=github --shard=${{ matrix.shard }}
144 + - run: yarn test ${{ matrix.params }} --ci --shard=${{ matrix.shard }}
145
146 # ----- BUILD -----
147 build_and_lint:
@@ -170,7 +170,7 @@ jobs:
170 path: "**/node_modules"
171 key: ${{ runner.arch }}-${{ runner.os }}-modules-${{ hashFiles('yarn.lock') }}
172 - run: yarn install --frozen-lockfile
173 - - run: yarn build --index=${{ matrix.worker_id }} --total=20 --r=${{ matrix.release_channel }} --ci=github
173 + - run: yarn build --index=${{ matrix.worker_id }} --total=20 --r=${{ matrix.release_channel }} --ci
174 env:
175 CI: github
176 RELEASE_CHANNEL: ${{ matrix.release_channel }}
@@ -248,7 +248,7 @@ jobs:
248 merge-multiple: true
249 - name: Display structure of build
250 run: ls -R build
251 - - run: yarn test --build ${{ matrix.test_params }} --shard=${{ matrix.shard }} --ci=github
251 + - run: yarn test --build ${{ matrix.test_params }} --shard=${{ matrix.shard }} --ci
252
253 process_artifacts_combined:
254 name: Process artifacts combined
.github/workflows/runtime_fuzz_tests.yml
+2 -2
@@ -32,5 +32,5 @@ jobs:
32 shell: bash
33 - name: Run fuzz tests
34 run: |-
35 - FUZZ_TEST_SEED=$RANDOM yarn test fuzz --ci=github
36 - FUZZ_TEST_SEED=$RANDOM yarn test --prod fuzz --ci=github
35 + FUZZ_TEST_SEED=$RANDOM yarn test fuzz --ci
36 + FUZZ_TEST_SEED=$RANDOM yarn test --prod fuzz --ci
scripts/jest/jest-cli.js
+4 -9
@@ -91,8 +91,8 @@ const argv = yargs
91 ci: {
92 describe: 'Run tests in CI',
93 requiresArg: false,
94 - type: 'choices',
95 - choices: ['circleci', 'github'],
94 + type: 'boolean',
95 + default: false,
96 },
97 compactConsole: {
98 alias: 'c',
@@ -308,12 +308,7 @@ function getCommandArgs() {
308 args.push('--useStderr');
309 }
310
311 - // CI Environments have limited workers.
312 - if (argv.ci === 'circleci') {
313 - args.push('--maxWorkers=2');
314 - }
315 -
316 - if (argv.ci === 'github') {
311 + if (argv.ci === true) {
312 args.push('--maxConcurrency=10');
313 }
314
@@ -368,7 +363,7 @@ function main() {
363 const envars = getEnvars();
364 const env = Object.entries(envars).map(([k, v]) => `${k}=${v}`);
365
371 - if (argv.ci !== 'github') {
366 + if (argv.ci !== true) {
367 // Print the full command we're actually running.
368 const command = `$ ${env.join(' ')} node ${args.join(' ')}`;
369 console.log(chalk.dim(command));
scripts/rollup/build-all-release-channels.js
+4 -4
@@ -76,8 +76,8 @@ const argv = yargs.wrap(yargs.terminalWidth()).options({
76 ci: {
77 describe: 'Run tests in CI',
78 requiresArg: false,
79 - type: 'choices',
80 - choices: ['circleci', 'github'],
79 + type: 'boolean',
80 + default: false,
81 },
82 type: {
83 describe: `Build the given bundle type. (${Object.values(
@@ -109,7 +109,7 @@ const argv = yargs.wrap(yargs.terminalWidth()).options({
109 }).argv;
110
111 async function main() {
112 - if (argv.ci === 'github') {
112 + if (argv.ci === true) {
113 buildForChannel(argv.releaseChannel, argv.total, argv.index);
114 switch (argv.releaseChannel) {
115 case 'stable': {
@@ -138,7 +138,7 @@ async function main() {
138 // Then merge the experimental folder into the stable one. processExperimental
139 // will have already removed conflicting files.
140 //
141 - // In CI, merging is handled automatically by CircleCI's workspace feature.
141 + // In CI, merging is handled by the GitHub Download Artifacts plugin.
142 mergeDirsSync(experimentalDir + '/', stableDir + '/');
143
144 // Now restore the combined directory back to its original name
scripts/rollup/stats.js
+1 -1
@@ -18,7 +18,7 @@ const currentBuildResults = {
18 };
19
20 function saveResults() {
21 - if (process.env.CI === 'github') {
21 + if (process.env.CI === true) {
22 mkdirp.sync('build/sizes');
23 fs.writeFileSync(
24 join('build', 'sizes', `bundle-sizes-${process.env.NODE_INDEX}.json`),