Skip to content
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.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions .buildkite/scripts/steps/checks/quick_checks.json
Original file line number Diff line number Diff line change
Expand Up @@ -101,9 +101,10 @@
"mayChangeFiles": true
},
{
"script": ".buildkite/scripts/steps/checks/unused_deps.sh"
"script": ".buildkite/scripts/steps/checks/unused_deps.sh",
"requiresStableWorkspace": true
},
{
"script": ".buildkite/scripts/steps/checks/jest_negative.sh"
}
]
]
12 changes: 6 additions & 6 deletions src/dev/run_quick_checks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ const MAX_ANNOTATION_OUTPUT_LINES = 50;
interface QuickCheck {
script: string;
mayChangeFiles?: boolean;
requiresStableWorkspace?: boolean;
// Additional properties can be added here in the future
}

Expand Down Expand Up @@ -74,20 +75,19 @@ void run(async ({ log, flagsReader }) => {
checks: flagsReader.string('checks'),
});

// Partition checks based on mayChangeFiles flag
const fileChangingChecks = checksToRun
.filter((check) => check.mayChangeFiles)
const workspaceExclusiveChecks = checksToRun
.filter((check) => check.mayChangeFiles || check.requiresStableWorkspace)
.map((check) => (isAbsolute(check.script) ? check.script : join(REPO_ROOT, check.script)));

const regularChecks = checksToRun
.filter((check) => !check.mayChangeFiles)
.filter((check) => !check.mayChangeFiles && !check.requiresStableWorkspace)
.map((check) => (isAbsolute(check.script) ? check.script : join(REPO_ROOT, check.script)));

logger.write(
`--- Running ${checksToRun.length} checks (${fileChangingChecks.length} file-changing with parallelism=1, ${regularChecks.length} regular with parallelism=${MAX_PARALLELISM})...`
`--- Running ${checksToRun.length} checks (${workspaceExclusiveChecks.length} workspace-exclusive with parallelism=1, ${regularChecks.length} regular with parallelism=${MAX_PARALLELISM})...`
);
const startTime = Date.now();
const results = await runPartitionedChecks(fileChangingChecks, regularChecks);
const results = await runPartitionedChecks(workspaceExclusiveChecks, regularChecks);

logger.write('--- All checks finished.');
printResults(startTime, results);
Expand Down
Loading