Skip to content

Commit

Permalink
Adding rush test command
Browse files Browse the repository at this point in the history
  • Loading branch information
petrukhin committed Sep 20, 2023
1 parent cb534e9 commit 1e8a460
Show file tree
Hide file tree
Showing 3 changed files with 761 additions and 268 deletions.
95 changes: 51 additions & 44 deletions common/config/rush/command-line.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,13 @@
* "rush my-global-command --help".
*/
"commands": [
{
"commandKind": "bulk",
"name": "test",
"summary": "Test packages.",
"description": "Executes automated tests.",
"enableParallelism": true
}
// {
// /**
// * (Required) Determines the type of custom command.
Expand All @@ -19,7 +26,7 @@
// * The set of projects can be restricted e.g. using the "--to" or "--from" parameters.
// */
// "commandKind": "bulk",
//
//
// /**
// * (Required) The name that will be typed as part of the command line. This is also the name
// * of the "scripts" hook in the project's package.json file (if "shellCommand" is not specified).
Expand All @@ -32,13 +39,13 @@
// * and will call the "rebuild" script instead of the "build" script.
// */
// "name": "my-bulk-command",
//
//
// /**
// * (Required) A short summary of the custom command to be shown when printing command line
// * help, e.g. "rush --help".
// */
// "summary": "Example bulk custom command",
//
//
// /**
// * A detailed description of the command to be shown when printing command line
// * help (e.g. "rush --help my-command").
Expand All @@ -48,7 +55,7 @@
// * documentation can make a big difference for the developer experience in your repo.
// */
// "description": "This is an example custom command that runs separately for each project",
//
//
// /**
// * By default, Rush operations acquire a lock file which prevents multiple commands from executing simultaneously
// * in the same repo folder. (For example, it would be a mistake to run "rush install" and "rush build" at the
Expand All @@ -58,7 +65,7 @@
// * In particular, this is needed for custom scripts that invoke other Rush commands.
// */
// "safeForSimultaneousRushProcesses": false,
//
//
// /**
// * (Optional) If the `shellCommand` field is set for a bulk command, Rush will invoke it for each
// * selected project; otherwise, Rush will invoke the package.json `"scripts"` entry matching Rush command name.
Expand All @@ -68,29 +75,29 @@
// * values will be appended to the end of this string.
// */
// // "shellCommand": "node common/scripts/my-bulk-command.js",
//
//
// /**
// * (Required) If true, then this command is safe to be run in parallel, i.e. executed
// * simultaneously for multiple projects. Similar to "rush build", regardless of parallelism
// * projects will not start processing until their dependencies have completed processing.
// */
// "enableParallelism": false,
//
//
// /**
// * Normally projects will be processed according to their dependency order: a given project will not start
// * processing the command until all of its dependencies have completed. This restriction doesn't apply for
// * certain operations, for example a "clean" task that deletes output files. In this case
// * you can set "ignoreDependencyOrder" to true to increase parallelism.
// */
// "ignoreDependencyOrder": false,
//
//
// /**
// * Normally Rush requires that each project's package.json has a "scripts" entry matching
// * the custom command name. To disable this check, set "ignoreMissingScript" to true;
// * projects with a missing definition will be skipped.
// */
// "ignoreMissingScript": false,
//
//
// /**
// * When invoking shell scripts, Rush uses a heuristic to distinguish errors from warnings:
// * - If the shell script returns a nonzero process exit code, Rush interprets this as "one or more errors".
Expand All @@ -112,12 +119,12 @@
// * Note: The default value is false. In Rush 5.7.x and earlier, the default value was true.
// */
// "allowWarningsInSuccessfulBuild": false,
//
//
// /**
// * If true then this command will be incremental like the built-in "build" command
// */
// "incremental": false,
//
//
// /**
// * (EXPERIMENTAL) Normally Rush terminates after the command finishes. If this option is set to "true" Rush
// * will instead enter a loop where it watches the file system for changes to the selected projects. Whenever a
Expand All @@ -127,34 +134,34 @@
// * For details, refer to the website article "Using watch mode".
// */
// "watchForChanges": false,
//
//
// /**
// * (EXPERIMENTAL) Disable cache for this action. This may be useful if this command affects state outside of
// * projects' own folders.
// */
// "disableBuildCache": false
// },
//
//
// {
// /**
// * (Required) Determines the type of custom command.
// * Rush's "global" commands are invoked once for the entire repo.
// */
// "commandKind": "global",
//
//
// "name": "my-global-command",
// "summary": "Example global custom command",
// "description": "This is an example custom command that runs once for the entire repo",
//
//
// "safeForSimultaneousRushProcesses": false,
//
//
// /**
// * (Required) A script that will be invoked using the OS shell. The working directory will be
// * the folder that contains rush.json. If custom parameters are associated with this command, their
// * values will be appended to the end of this string.
// */
// "shellCommand": "node common/scripts/my-global-command.js",
//
//
// /**
// * If your "shellCommand" script depends on NPM packages, the recommended best practice is
// * to make it into a regular Rush project that builds using your normal toolchain. In cases where
Expand Down Expand Up @@ -188,12 +195,12 @@
// * A "flag" is a custom command-line parameter whose presence acts as an on/off switch.
// */
// "parameterKind": "flag",
//
//
// /**
// * (Required) The long name of the parameter. It must be lower-case and use dash delimiters.
// */
// "longName": "--my-flag",
//
//
// /**
// * An optional alternative short name for the parameter. It must be a dash followed by a single
// * lower-case or upper-case letter, which is case-sensitive.
Expand All @@ -204,22 +211,22 @@
// * a short name if you expect the parameter to be needed very often in everyday operations.
// */
// "shortName": "-m",
//
//
// /**
// * (Required) A long description to be shown in the command-line help.
// *
// * Whenever you introduce commands/parameters, taking a little time to write meaningful
// * documentation can make a big difference for the developer experience in your repo.
// */
// "description": "A custom flag parameter that is passed to the scripts that are invoked when building projects",
//
//
// /**
// * (Required) A list of custom commands and/or built-in Rush commands that this parameter may
// * be used with. The parameter will be appended to the shell command that Rush invokes.
// */
// "associatedCommands": ["build", "rebuild"]
// },
//
//
// {
// /**
// * (Required) Determines the type of custom parameter.
Expand All @@ -228,17 +235,17 @@
// "parameterKind": "string",
// "longName": "--my-string",
// "description": "A custom string parameter for the \"my-global-command\" custom command",
//
//
// "associatedCommands": ["my-global-command"],
//
//
// "argumentName": "SOME_TEXT",
//
//
// /**
// * If true, this parameter must be included with the command. The default is false.
// */
// "required": false
// },
//
//
// {
// /**
// * (Required) Determines the type of custom parameter.
Expand All @@ -248,17 +255,17 @@
// "parameterKind": "choice",
// "longName": "--my-choice",
// "description": "A custom choice parameter for the \"my-global-command\" custom command",
//
//
// "associatedCommands": ["my-global-command"],
// "required": false,
//
//
// /**
// * If a "defaultValue" is specified, then if the Rush command line is invoked without
// * this parameter, it will be automatically added with the "defaultValue" as the argument.
// * The value must be one of the defined alternatives.
// */
// "defaultValue": "vanilla",
//
//
// /**
// * (Required) A list of alternative argument values that can be chosen for this parameter.
// */
Expand All @@ -269,7 +276,7 @@
// * e.g. "vanilla" in "--flavor vanilla".
// */
// "name": "vanilla",
//
//
// /**
// * A detailed description for the alternative that can be shown in the command-line help.
// *
Expand All @@ -278,19 +285,19 @@
// */
// "description": "Use the vanilla flavor"
// },
//
//
// {
// "name": "chocolate",
// "description": "Use the chocolate flavor"
// },
//
//
// {
// "name": "strawberry",
// "description": "Use the strawberry flavor"
// }
// ]
// },
//
//
// {
// /**
// * (Required) Determines the type of custom parameter.
Expand All @@ -299,12 +306,12 @@
// "parameterKind": "integer",
// "longName": "--my-integer",
// "description": "A custom integer parameter for the \"my-global-command\" custom command",
//
//
// "associatedCommands": ["my-global-command"],
// "argumentName": "SOME_NUMBER",
// "required": false
// },
//
//
// {
// /**
// * (Required) Determines the type of custom parameter.
Expand All @@ -319,12 +326,12 @@
// "parameterKind": "integerList",
// "longName": "--my-integer-list",
// "description": "A custom integer list parameter for the \"my-global-command\" custom command",
//
//
// "associatedCommands": ["my-global-command"],
// "argumentName": "SOME_NUMBER",
// "required": false
// },
//
//
// {
// /**
// * (Required) Determines the type of custom parameter.
Expand All @@ -339,12 +346,12 @@
// "parameterKind": "stringList",
// "longName": "--my-string-list",
// "description": "A custom string list parameter for the \"my-global-command\" custom command",
//
//
// "associatedCommands": ["my-global-command"],
// "argumentName": "SOME_TEXT",
// "required": false
// },
//
//
// {
// /**
// * (Required) Determines the type of custom parameter.
Expand All @@ -360,10 +367,10 @@
// "parameterKind": "choiceList",
// "longName": "--my-choice-list",
// "description": "A custom choice list parameter for the \"my-global-command\" custom command",
//
//
// "associatedCommands": ["my-global-command"],
// "required": false,
//
//
// /**
// * (Required) A list of alternative argument values that can be chosen for this parameter.
// */
Expand All @@ -374,7 +381,7 @@
// * e.g. "vanilla" in "--flavor vanilla".
// */
// "name": "vanilla",
//
//
// /**
// * A detailed description for the alternative that can be shown in the command-line help.
// *
Expand All @@ -383,12 +390,12 @@
// */
// "description": "Use the vanilla flavor"
// },
//
//
// {
// "name": "chocolate",
// "description": "Use the chocolate flavor"
// },
//
//
// {
// "name": "strawberry",
// "description": "Use the strawberry flavor"
Expand Down
Loading

0 comments on commit 1e8a460

Please sign in to comment.