Deprecate old test script commands (#19893)
* Deprecate old test script commands * Update PR template test script * Add test-stable and test-www-classic * Update circle test names * Rename test-www-classic to test-classic * Missed some job renames * Missed some more job renames
Ricky committed
Oct 14, 2020 at 08:54 UTC
880587366d84f9d36dd606088bc7bad050ead77e
4 files changed
+68
-57
.circleci/config.yml
+43
-43
@@ -101,7 +101,7 @@ jobs:
101
- *restore_node_modules
102
- run: node ./scripts/tasks/flow-ci
103
104
- RELEASE_CHANNEL_stable_yarn_test:
104
+ yarn_test-stable:
105
docker: *docker
106
environment: *environment
107
parallelism: *TEST_PARALLELISM
@@ -109,7 +109,7 @@ jobs:
109
steps:
110
- checkout
111
- *restore_node_modules
112
- - run: yarn test --release-channel=stable --ci
112
+ - run: yarn test-stable --ci
113
114
yarn_test:
115
docker: *docker
@@ -120,79 +120,79 @@ jobs:
120
- *restore_node_modules
121
- run: yarn test --ci
122
123
- RELEASE_CHANNEL_stable_yarn_test_www:
123
+ yarn_test-classic:
124
docker: *docker
125
environment: *environment
126
parallelism: *TEST_PARALLELISM
127
steps:
128
- checkout
129
- *restore_node_modules
130
- - run: yarn test --release-channel=www-classic --ci
130
+ - run: yarn test-classic --ci
131
132
- RELEASE_CHANNEL_stable_yarn_test_www_variant:
132
+ yarn_test-classic_variant:
133
docker: *docker
134
environment: *environment
135
parallelism: *TEST_PARALLELISM
136
steps:
137
- checkout
138
- *restore_node_modules
139
- - run: yarn test --release-channel=www-classic --variant --ci
139
+ - run: yarn test-classic --variant --ci
140
141
- RELEASE_CHANNEL_stable_yarn_test_prod_www:
141
+ yarn_test-classic_prod:
142
docker: *docker
143
environment: *environment
144
parallelism: *TEST_PARALLELISM
145
steps:
146
- checkout
147
- *restore_node_modules
148
- - run: yarn test --release-channel=www-classic --prod --ci
148
+ - run: yarn test-classic --prod --ci
149
150
- RELEASE_CHANNEL_stable_yarn_test_prod_www_variant:
150
+ yarn_test-classic_prod_variant:
151
docker: *docker
152
environment: *environment
153
parallelism: *TEST_PARALLELISM
154
steps:
155
- checkout
156
- *restore_node_modules
157
- - run: yarn test --release-channel=www-classic --prod --variant --ci
157
+ - run: yarn test-classic --prod --variant --ci
158
159
- yarn_test_www:
159
+ yarn_test-www:
160
docker: *docker
161
environment: *environment
162
parallelism: *TEST_PARALLELISM
163
steps:
164
- checkout
165
- *restore_node_modules
166
- - run: yarn test --release-channel=www-modern --ci
166
+ - run: yarn test-www --ci
167
168
- yarn_test_www_variant:
168
+ yarn_test-www_variant:
169
docker: *docker
170
environment: *environment
171
parallelism: *TEST_PARALLELISM
172
steps:
173
- checkout
174
- *restore_node_modules
175
- - run: yarn test --release-channel=www-modern --variant --ci
175
+ - run: yarn test-www --variant --ci
176
177
- yarn_test_prod_www:
177
+ yarn_test-www_prod:
178
docker: *docker
179
environment: *environment
180
parallelism: *TEST_PARALLELISM
181
steps:
182
- checkout
183
- *restore_node_modules
184
- - run: yarn test --release-channel=www-modern --prod --ci
184
+ - run: yarn test-www --prod --ci
185
186
- yarn_test_prod_www_variant:
186
+ yarn_test-www_prod_variant:
187
docker: *docker
188
environment: *environment
189
parallelism: *TEST_PARALLELISM
190
steps:
191
- checkout
192
- *restore_node_modules
193
- - run: yarn test --release-channel=www-modern --prod --variant --ci
193
+ - run: yarn test-www --prod --variant --ci
194
195
- RELEASE_CHANNEL_stable_yarn_test_persistent:
195
+ yarn_test-stable_persistent:
196
docker: *docker
197
environment: *environment
198
parallelism: *TEST_PARALLELISM
@@ -200,9 +200,9 @@ jobs:
200
steps:
201
- checkout
202
- *restore_node_modules
203
- - run: yarn test --release-channel=stable --persistent --ci
203
+ - run: yarn test-stable --persistent --ci
204
205
- RELEASE_CHANNEL_stable_yarn_test_prod:
205
+ yarn_test-stable_prod:
206
docker: *docker
207
environment: *environment
208
parallelism: *TEST_PARALLELISM
@@ -210,7 +210,7 @@ jobs:
210
steps:
211
- checkout
212
- *restore_node_modules
213
- - run: yarn test --release-channel=stable --prod --ci
213
+ - run: yarn test-stable --prod --ci
214
215
yarn_test_prod:
216
docker: *docker
@@ -219,7 +219,7 @@ jobs:
219
steps:
220
- checkout
221
- *restore_node_modules
222
- - run: yarn test --release-channel=experimental --prod --ci
222
+ - run: yarn test --prod --ci
223
224
RELEASE_CHANNEL_stable_yarn_build:
225
docker: *docker
@@ -316,7 +316,7 @@ jobs:
316
root: packages/react-devtools-scheduling-profiler
317
paths:
318
- dist
319
-
319
+
320
deploy_devtools_scheduling_profiler:
321
docker: *docker
322
environment: *environment
@@ -389,7 +389,7 @@ jobs:
389
command: yarn lint-build
390
- run: scripts/circleci/check_minified_errors.sh
391
392
- RELEASE_CHANNEL_stable_yarn_test_build:
392
+ yarn_test-stable_build:
393
docker: *docker
394
environment: *environment
395
parallelism: *TEST_PARALLELISM
@@ -397,7 +397,7 @@ jobs:
397
- checkout
398
- attach_workspace: *attach_workspace
399
- *restore_node_modules
400
- - run: yarn test --release-channel=stable --build --ci
400
+ - run: yarn test-stable --build --ci
401
402
yarn_test_build:
403
docker: *docker
@@ -407,7 +407,7 @@ jobs:
407
- checkout
408
- attach_workspace: *attach_workspace
409
- *restore_node_modules
410
- - run: yarn test --release-channel=experimental --build --ci
410
+ - run: yarn test --build --ci
411
412
yarn_test_build_devtools:
413
docker: *docker
@@ -447,7 +447,7 @@ jobs:
447
FUZZ_TEST_SEED=$RANDOM yarn test fuzz --ci
448
FUZZ_TEST_SEED=$RANDOM yarn test --prod fuzz --ci
449
450
- RELEASE_CHANNEL_stable_yarn_test_build_prod:
450
+ yarn_test-stable_build_prod:
451
docker: *docker
452
environment: *environment
453
parallelism: *TEST_PARALLELISM
@@ -455,7 +455,7 @@ jobs:
455
- checkout
456
- attach_workspace: *attach_workspace
457
- *restore_node_modules
458
- - run: yarn test --release-channel=stable --build --prod --ci
458
+ - run: yarn test-stable --build --prod --ci
459
460
yarn_test_build_prod:
461
docker: *docker
@@ -465,7 +465,7 @@ jobs:
465
- checkout
466
- attach_workspace: *attach_workspace
467
- *restore_node_modules
468
- - run: yarn test --release-channel=experimental --build --prod --ci
468
+ - run: yarn test --build --prod --ci
469
470
workflows:
471
version: 2
@@ -478,25 +478,25 @@ workflows:
478
- yarn_flow:
479
requires:
480
- setup
481
- - RELEASE_CHANNEL_stable_yarn_test:
481
+ - yarn_test-stable:
482
requires:
483
- setup
484
- - RELEASE_CHANNEL_stable_yarn_test_prod:
484
+ - yarn_test-stable_prod:
485
requires:
486
- setup
487
- - RELEASE_CHANNEL_stable_yarn_test_persistent:
487
+ - yarn_test-stable_persistent:
488
requires:
489
- setup
490
- - RELEASE_CHANNEL_stable_yarn_test_www:
490
+ - yarn_test-classic:
491
requires:
492
- setup
493
- - RELEASE_CHANNEL_stable_yarn_test_www_variant:
493
+ - yarn_test-classic_variant:
494
requires:
495
- setup
496
- - RELEASE_CHANNEL_stable_yarn_test_prod_www:
496
+ - yarn_test-classic_prod:
497
requires:
498
- setup
499
- - RELEASE_CHANNEL_stable_yarn_test_prod_www_variant:
499
+ - yarn_test-classic_prod_variant:
500
requires:
501
- setup
502
- RELEASE_CHANNEL_stable_yarn_build:
@@ -511,10 +511,10 @@ workflows:
511
- RELEASE_CHANNEL_stable_yarn_lint_build:
512
requires:
513
- RELEASE_CHANNEL_stable_yarn_build
514
- - RELEASE_CHANNEL_stable_yarn_test_build:
514
+ - yarn_test-stable_build:
515
requires:
516
- RELEASE_CHANNEL_stable_yarn_build
517
- - RELEASE_CHANNEL_stable_yarn_test_build_prod:
517
+ - yarn_test-stable_build_prod:
518
requires:
519
- RELEASE_CHANNEL_stable_yarn_build
520
- RELEASE_CHANNEL_stable_yarn_test_dom_fixtures:
@@ -530,16 +530,16 @@ workflows:
530
- yarn_test_prod:
531
requires:
532
- setup
533
- - yarn_test_www:
533
+ - yarn_test-www:
534
requires:
535
- setup
536
- - yarn_test_www_variant:
536
+ - yarn_test-www_variant:
537
requires:
538
- setup
539
- - yarn_test_prod_www:
539
+ - yarn_test-www_prod:
540
requires:
541
- setup
542
- - yarn_test_prod_www_variant:
542
+ - yarn_test-www_prod_variant:
543
requires:
544
- setup
545
- yarn_build:
.github/PULL_REQUEST_TEMPLATE.md
+1
-1
@@ -8,7 +8,7 @@
8
2. Run `yarn` in the repository root.
9
3. If you've fixed a bug or added code that should be tested, add tests!
10
4. Ensure the test suite passes (`yarn test`). Tip: `yarn test --watch TestName` is helpful in development.
11
- 5. Run `yarn test-prod` to test in the production environment. It supports the same options as `yarn test`.
11
+ 5. Run `yarn test --prod` to test in the production environment. It supports the same options as `yarn test`.
12
6. If you need a debugger, run `yarn debug-test --watch TestName`, open `chrome://inspect`, and press "Inspect".
13
7. Format your code with [prettier](https://github.com/prettier/prettier) (`yarn prettier`).
14
8. Make sure your code lints (`yarn lint`). Tip: `yarn linc` to only check changed files.
package.json
+15
-13
@@ -110,21 +110,23 @@
110
"lint-build": "node ./scripts/rollup/validate/index.js",
111
"extract-errors": "yarn build --type=dev --extract-errors",
112
"postinstall": "node node_modules/fbjs-scripts/node/check-dev-engines.js package.json && node ./scripts/flow/createFlowConfigs.js && node ./scripts/yarn/downloadReactIsForPrettyFormat.js",
113
- "debug-test": "yarn test --debug",
113
+ "debug-test": "yarn test --deprecated 'yarn test --debug'",
114
"test": "node ./scripts/jest/jest-cli.js",
115
- "test-www": "yarn test --release-channel=www-modern",
116
- "test-www-variant": "yarn test --release-channel=www-modern --variant",
117
- "test-prod-www": "yarn test --prod --release-channel=www-modern",
118
- "test-prod-www-variant": "yarn test --prod --release-channel=www-modern --variant",
119
- "test-persistent": "yarn test --persistent",
120
- "debug-test-persistent": "yarn test --debug --persistent",
121
- "test-prod": "yarn test --prod",
122
- "debug-test-prod": "yarn test --debug --prod",
123
- "test-prod-build": "yarn test --prod --build",
124
- "test-build": "yarn test --build",
125
- "test-build-prod": "yarn test --build --prod",
115
+ "test-stable": "node ./scripts/jest/jest-cli.js --release-channel=stable",
116
+ "test-www": "node ./scripts/jest/jest-cli.js --release-channel=www-modern",
117
+ "test-classic": "node ./scripts/jest/jest-cli.js --release-channel=www-classic",
118
+ "test-www-variant": "yarn test --deprecated 'yarn test-www --variant'",
119
+ "test-prod-www": "yarn test --deprecated 'yarn test-www --prod'",
120
+ "test-prod-www-variant": "yarn test --deprecated 'yarn test-www --prod --variant'",
121
+ "test-persistent": "yarn test --deprecated 'yarn test --persistent'",
122
+ "debug-test-persistent": "yarn test --deprecated 'yarn test --debug --persistent'",
123
+ "test-prod": "yarn test --deprecated 'yarn test --prod'",
124
+ "debug-test-prod": "yarn test --deprecated 'yarn test --debug --prod'",
125
+ "test-prod-build": "yarn test --deprecated 'yarn test --prod --build'",
126
+ "test-build": "yarn test --deprecated 'yarn test --build'",
127
+ "test-build-prod": "yarn test --deprecated 'yarn test --build --prod'",
128
"test-build-devtools": "yarn test --build --project devtools",
127
- "debug-test-build-devtools": "yarn test --debug --build --project devtools",
129
+ "debug-test-build-devtools": "yarn test --deprecated 'yarn test-build-devtools --debug'",
130
"test-dom-fixture": "cd fixtures/dom && yarn && yarn prestart && yarn test",
131
"flow": "node ./scripts/tasks/flow.js",
132
"flow-ci": "node ./scripts/tasks/flow-ci.js",
scripts/jest/jest-cli.js
+9
@@ -93,6 +93,11 @@ const argv = yargs
93
type: 'boolean',
94
default: false,
95
},
96
+ deprecated: {
97
+ describe: 'Print deprecation message for command.',
98
+ requiresArg: true,
99
+ type: 'string',
100
+ },
101
}).argv;
102
103
function logError(message) {
@@ -287,6 +292,10 @@ function getEnvars() {
292
}
293
294
function main() {
295
+ if (argv.deprecated) {
296
+ console.log(chalk.red(`\nPlease run: \`${argv.deprecated}\` instead.\n`));
297
+ return;
298
+ }
299
validateOptions();
300
const args = getCommandArgs();
301
const envars = getEnvars();