mirror of
https://github.com/morluto/rea.git
synced 2026-11-20 21:53:51 +00:00
fix(ci): preserve all cases in selected test shards (#12425)
* fix(ci): keep test-name filters out of selected shards * fix(ci): reject parsed name filters in selected test shards * fix(ci): reject parsed tag filters in selected test shards --------- Co-authored-by: ShuaixinHuang <ShuaixinHuang@users.noreply.github.com> Co-authored-by: morluto <76467478+morluto@users.noreply.github.com>
This commit is contained in:
3 files changed
+92
-2
No files matched your search
@@ -28,7 +28,7 @@ if (group === "selected") {
|
||||
throw new Error("Selected test groups are already sharded");
|
||||
runner = [
|
||||
resolve("scripts/run-exact-tests.mjs"),
|
||||
"run",
|
||||
"ci-selected",
|
||||
`--shard=${shard}`,
|
||||
...rest,
|
||||
...plan.files,
|
||||
|
||||
@@ -5,7 +5,15 @@ import { createVitest, parseCLI } from "vitest/node";
|
||||
|
||||
// CLI file filters are substring matches. Select discovered specifications by
|
||||
// identity instead, retaining each project's include/exclude and runner settings.
|
||||
const { filter, options } = parseCLI(["vitest", ...process.argv.slice(2)]);
|
||||
const args = process.argv.slice(2);
|
||||
const ciSelected = args[0] === "ci-selected";
|
||||
if (ciSelected) args[0] = "run";
|
||||
const { filter, options } = parseCLI(["vitest", ...args]);
|
||||
if (
|
||||
ciSelected &&
|
||||
(options.testNamePattern !== undefined || options.tagsFilter !== undefined)
|
||||
)
|
||||
throw new Error("Selected test groups cannot filter cases by name or tag");
|
||||
const vitest = await createVitest({ ...options, watch: false });
|
||||
const signalExitCodes = { SIGINT: 130, SIGTERM: 143 };
|
||||
let shutdownSignal;
|
||||
|
||||
Reference in new issue
Block a user