Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Run lint in parallel with runtests-parallel #52945

Merged
merged 5 commits into from Feb 27, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
3 changes: 2 additions & 1 deletion .github/workflows/ci.yml
Expand Up @@ -39,7 +39,8 @@ jobs:
- run: npm ci

- name: Tests
run: npm run test -- --bundle=${{ matrix.bundle }}
# run tests, but lint separately
run: npm run test -- --no-lint --bundle=${{ matrix.bundle }}
jakebailey marked this conversation as resolved.
Show resolved Hide resolved

lint:
runs-on: ubuntu-latest
Expand Down
11 changes: 9 additions & 2 deletions Herebyfile.mjs
Expand Up @@ -702,12 +702,19 @@ export const runTestsAndWatch = task({
},
});

export const runTestsParallel = task({
name: "runtests-parallel",
const doRunTestsParallel = task({
name: "do-runtests-parallel",
description: "Runs all the tests in parallel using the built run.js file.",
dependencies: runtestsDeps,
run: () => runConsoleTests(testRunner, "min", /*runInParallel*/ cmdLineOptions.workers > 1),
});

export const runTestsParallel = task({
name: "runtests-parallel",
description: "Runs all the tests in parallel using the built run.js file, linting in parallel if --lint=true.",
dependencies: [doRunTestsParallel].concat(cmdLineOptions.lint ? [lint] : []),
});

// task("runtests-parallel").flags = {
// " --light": "Run tests in light mode (fewer verifications, but tests run faster).",
// " --keepFailed": "Keep tests in .failed-tests even if they pass.",
Expand Down
4 changes: 3 additions & 1 deletion scripts/build/options.mjs
Expand Up @@ -4,7 +4,7 @@ import os from "os";
const ci = ["1", "true"].includes(process.env.CI ?? "");

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

Expand Down Expand Up @@ -86,5 +87,6 @@ export default options;
* @property {string} break
* @property {boolean} bundle
* @property {boolean} typecheck
* @property {boolean} lint
*/
void 0;