Skip to content

Commit

Permalink
Don't run linter after tests runs (#50597)
Browse files Browse the repository at this point in the history
  • Loading branch information
jakebailey committed Sep 12, 2022
1 parent 8e5e2e0 commit 68d526c
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 11 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Expand Up @@ -32,7 +32,7 @@ jobs:
- run: npm ci

- name: Tests
run: npm test -- --no-lint
run: npm test

lint:
runs-on: ubuntu-latest
Expand Down
9 changes: 2 additions & 7 deletions Gulpfile.js
Expand Up @@ -424,10 +424,8 @@ task("watch-local").flags = {
const preTest = parallel(buildTsc, buildTests, buildServices, buildLssl);
preTest.displayName = "preTest";

const postTest = (done) => cmdLineOptions.lint ? lint() : done();

const runTests = () => runConsoleTests("built/local/run.js", "mocha-fivemat-progress-reporter", /*runInParallel*/ false, /*watchMode*/ false);
task("runtests", series(preBuild, preTest, runTests, postTest));
task("runtests", series(preBuild, preTest, runTests));
task("runtests").description = "Runs the tests using the built run.js file.";
task("runtests").flags = {
"-t --tests=<regex>": "Pattern for tests to run.",
Expand All @@ -439,18 +437,16 @@ task("runtests").flags = {
" --dirty": "Run tests without first cleaning test output directories",
" --stackTraceLimit=<limit>": "Sets the maximum number of stack frames to display. Use 'full' to show all frames.",
" --no-color": "Disables color",
" --no-lint": "Disables lint",
" --timeout=<ms>": "Overrides the default test timeout.",
" --built": "Compile using the built version of the compiler.",
" --shards": "Total number of shards running tests (default: 1)",
" --shardId": "1-based ID of this shard (default: 1)",
};

const runTestsParallel = () => runConsoleTests("built/local/run.js", "min", /*runInParallel*/ cmdLineOptions.workers > 1, /*watchMode*/ false);
task("runtests-parallel", series(preBuild, preTest, runTestsParallel, postTest));
task("runtests-parallel", series(preBuild, preTest, runTestsParallel));
task("runtests-parallel").description = "Runs all the tests in parallel using the built run.js file.";
task("runtests-parallel").flags = {
" --no-lint": "disables lint.",
" --light": "Run tests in light mode (fewer verifications, but tests run faster).",
" --keepFailed": "Keep tests in .failed-tests even if they pass.",
" --dirty": "Run tests without first cleaning test output directories.",
Expand Down Expand Up @@ -613,7 +609,6 @@ task("watch").flags = {
" --dirty": "Run tests without first cleaning test output directories",
" --stackTraceLimit=<limit>": "Sets the maximum number of stack frames to display. Use 'full' to show all frames.",
" --no-color": "Disables color",
" --no-lint": "Disables lint",
" --timeout=<ms>": "Overrides the default test timeout.",
" --workers=<number>": "The number of parallel workers to use.",
" --built": "Compile using the built version of the compiler.",
Expand Down
4 changes: 1 addition & 3 deletions scripts/build/options.js
Expand Up @@ -6,7 +6,7 @@ const ci = ["1", "true"].includes(process.env.CI);

/** @type {CommandLineOptions} */
module.exports = minimist(process.argv.slice(2), {
boolean: ["dirty", "light", "colors", "lint", "lkg", "soft", "fix", "failed", "keepFailed", "force", "built", "ci"],
boolean: ["dirty", "light", "colors", "lkg", "soft", "fix", "failed", "keepFailed", "force", "built", "ci"],
string: ["browser", "tests", "break", "host", "reporter", "stackTraceLimit", "timeout", "shards", "shardId"],
alias: {
/* eslint-disable quote-props */
Expand All @@ -33,7 +33,6 @@ module.exports = minimist(process.argv.slice(2), {
runners: process.env.runners || process.env.runner || process.env.ru,
light: process.env.light === undefined || process.env.light !== "false",
reporter: process.env.reporter || process.env.r,
lint: process.env.lint || true,
fix: process.env.fix || process.env.f,
workers: process.env.workerCount || ((os.cpus().length - (ci ? 0 : 1)) || 1),
failed: false,
Expand All @@ -54,7 +53,6 @@ if (module.exports.built) {
* @property {boolean} dirty
* @property {boolean} light
* @property {boolean} colors
* @property {boolean} lint
* @property {boolean} lkg
* @property {boolean} built
* @property {boolean} soft
Expand Down

0 comments on commit 68d526c

Please sign in to comment.