Skip to content

Commit c97ddac

Browse files
Run lint in parallel with runtests-parallel (microsoft#52945)
Co-authored-by: Daniel Rosenwasser <[email protected]>
1 parent 7a0061a commit c97ddac

File tree

3 files changed

+14
-4
lines changed

3 files changed

+14
-4
lines changed

.github/workflows/ci.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,8 @@ jobs:
3939
- run: npm ci
4040

4141
- name: Tests
42-
run: npm run test -- --bundle=${{ matrix.bundle }}
42+
# run tests, but lint separately
43+
run: npm run test -- --no-lint --bundle=${{ matrix.bundle }}
4344

4445
lint:
4546
runs-on: ubuntu-latest

Herebyfile.mjs

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -702,12 +702,19 @@ export const runTestsAndWatch = task({
702702
},
703703
});
704704

705-
export const runTestsParallel = task({
706-
name: "runtests-parallel",
705+
const doRunTestsParallel = task({
706+
name: "do-runtests-parallel",
707707
description: "Runs all the tests in parallel using the built run.js file.",
708708
dependencies: runtestsDeps,
709709
run: () => runConsoleTests(testRunner, "min", /*runInParallel*/ cmdLineOptions.workers > 1),
710710
});
711+
712+
export const runTestsParallel = task({
713+
name: "runtests-parallel",
714+
description: "Runs all the tests in parallel using the built run.js file, linting in parallel if --lint=true.",
715+
dependencies: [doRunTestsParallel].concat(cmdLineOptions.lint ? [lint] : []),
716+
});
717+
711718
// task("runtests-parallel").flags = {
712719
// " --light": "Run tests in light mode (fewer verifications, but tests run faster).",
713720
// " --keepFailed": "Keep tests in .failed-tests even if they pass.",

scripts/build/options.mjs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import os from "os";
44
const ci = ["1", "true"].includes(process.env.CI ?? "");
55

66
const parsed = minimist(process.argv.slice(2), {
7-
boolean: ["dirty", "light", "colors", "lkg", "soft", "fix", "failed", "keepFailed", "force", "built", "ci", "bundle", "typecheck"],
7+
boolean: ["dirty", "light", "colors", "lkg", "soft", "fix", "failed", "keepFailed", "force", "built", "ci", "bundle", "typecheck", "lint"],
88
string: ["browser", "tests", "break", "host", "reporter", "stackTraceLimit", "timeout", "shards", "shardId"],
99
alias: {
1010
/* eslint-disable quote-props */
@@ -41,6 +41,7 @@ const parsed = minimist(process.argv.slice(2), {
4141
ci,
4242
bundle: true,
4343
typecheck: true,
44+
lint: true,
4445
}
4546
});
4647

@@ -86,5 +87,6 @@ export default options;
8687
* @property {string} break
8788
* @property {boolean} bundle
8889
* @property {boolean} typecheck
90+
* @property {boolean} lint
8991
*/
9092
void 0;

0 commit comments

Comments
 (0)