yarn test: Default to bleeding edge configuration (#21238)

My personal workflow is to develop against the www-modern release
channel, with the variant flags enabled, because it encompasses the
largest set of features. Then I rely on CI to run the tests against
all the other configurations.

So in practice, I almost always run

```
yarn test -r=www-modern --variant TEST_FILE
```

instead of

```
yarn test TEST_FILE
```

So, I've updated the `yarn test` command to use those options
by default.
This commit is contained in:
Andrew Clark 2021-04-12 11:49:26 -05:00 committed by GitHub
parent 9d48779b36
commit dd8552ae0d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 29 additions and 23 deletions

View File

@ -462,14 +462,14 @@ workflows:
- "-r=stable --env=production"
- "-r=experimental --env=development"
- "-r=experimental --env=production"
- "-r=www-classic --env=development"
- "-r=www-classic --env=production"
- "-r=www-classic --env=development --variant"
- "-r=www-classic --env=production --variant"
- "-r=www-modern --env=development"
- "-r=www-modern --env=production"
- "-r=www-modern --env=development --variant"
- "-r=www-modern --env=production --variant"
- "-r=www-classic --env=development --variant=false"
- "-r=www-classic --env=production --variant=false"
- "-r=www-classic --env=development --variant=true"
- "-r=www-classic --env=production --variant=true"
- "-r=www-modern --env=development --variant=false"
- "-r=www-modern --env=production --variant=false"
- "-r=www-modern --env=development --variant=true"
- "-r=www-modern --env=production --variant=true"
# TODO: Test more persistent configurations?
- '-r=stable --env=development --persistent'
@ -497,14 +497,14 @@ workflows:
- "--project=devtools -r=experimental"
# TODO: Update test config to support www build tests
# - "-r=www-classic --env=development"
# - "-r=www-classic --env=production"
# - "-r=www-classic --env=development --variant"
# - "-r=www-classic --env=production --variant"
# - "-r=www-modern --env=development"
# - "-r=www-modern --env=production"
# - "-r=www-modern --env=development --variant"
# - "-r=www-modern --env=production --variant"
# - "-r=www-classic --env=development --variant=false"
# - "-r=www-classic --env=production --variant=false"
# - "-r=www-classic --env=development --variant=true"
# - "-r=www-classic --env=production --variant=true"
# - "-r=www-modern --env=development --variant=false"
# - "-r=www-modern --env=production --variant=false"
# - "-r=www-modern --env=development --variant=true"
# - "-r=www-modern --env=production --variant=true"
# TODO: Test more persistent configurations?
- get_base_build:

View File

@ -44,7 +44,7 @@ const argv = yargs
describe: 'Run with the given release channel.',
requiresArg: true,
type: 'string',
default: 'experimental',
default: 'www-modern',
choices: ['experimental', 'stable', 'www-classic', 'www-modern'],
},
env: {
@ -71,7 +71,6 @@ const argv = yargs
describe: 'Run with www variant set to true.',
requiresArg: false,
type: 'boolean',
default: false,
},
build: {
alias: 'b',
@ -161,12 +160,19 @@ function validateOptions() {
}
}
if (argv.variant && !isWWWConfig()) {
if (isWWWConfig()) {
if (argv.variant === undefined) {
// Turn internal experiments on by default
argv.variant = true;
}
} else {
if (argv.variant) {
logError(
'Variant is only supported for the www release channels. Update these options to continue.'
);
success = false;
}
}
if (argv.build && argv.persistent) {
logError(