From 68d526c200a0a5c51024586890b2473c9819c6ea Mon Sep 17 00:00:00 2001 From: Jake Bailey <5341706+jakebailey@users.noreply.github.com> Date: Mon, 12 Sep 2022 13:30:18 -0700 Subject: [PATCH] Don't run linter after tests runs (#50597) --- .github/workflows/ci.yml | 2 +- Gulpfile.js | 9 ++------- scripts/build/options.js | 4 +--- 3 files changed, 4 insertions(+), 11 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index e064f3eae3e1b..956a41729655f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -32,7 +32,7 @@ jobs: - run: npm ci - name: Tests - run: npm test -- --no-lint + run: npm test lint: runs-on: ubuntu-latest diff --git a/Gulpfile.js b/Gulpfile.js index d422b2f8e1a99..5f4f365915dda 100644 --- a/Gulpfile.js +++ b/Gulpfile.js @@ -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=": "Pattern for tests to run.", @@ -439,7 +437,6 @@ task("runtests").flags = { " --dirty": "Run tests without first cleaning test output directories", " --stackTraceLimit=": "Sets the maximum number of stack frames to display. Use 'full' to show all frames.", " --no-color": "Disables color", - " --no-lint": "Disables lint", " --timeout=": "Overrides the default test timeout.", " --built": "Compile using the built version of the compiler.", " --shards": "Total number of shards running tests (default: 1)", @@ -447,10 +444,9 @@ task("runtests").flags = { }; 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.", @@ -613,7 +609,6 @@ task("watch").flags = { " --dirty": "Run tests without first cleaning test output directories", " --stackTraceLimit=": "Sets the maximum number of stack frames to display. Use 'full' to show all frames.", " --no-color": "Disables color", - " --no-lint": "Disables lint", " --timeout=": "Overrides the default test timeout.", " --workers=": "The number of parallel workers to use.", " --built": "Compile using the built version of the compiler.", diff --git a/scripts/build/options.js b/scripts/build/options.js index 8fe0bc5593ace..fc237c5885584 100644 --- a/scripts/build/options.js +++ b/scripts/build/options.js @@ -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 */ @@ -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, @@ -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