fix: support upstream workspace CI partition

This commit is contained in:
Dotta committed 2026-10-10 22:39:48 -05:00
1 parent fd3ec56106
commit 7c24026290
2 files changed
+40 -7

No files matched your search

@@ -107,9 +107,17 @@ test("general shards retain scripts and route-named suites outside the serialize
]) assert.ok(general.selectedGeneralServerSuites.includes(file), `missing configured server suite: ${file}`);
});
test("shard flags are rejected for the workspaces-b group", () => {
const result = dryRun(["--mode", "general", "--group", "general-workspaces-b", "--shard-index", "0", "--shard-count", "3"]);
assert.notEqual(result.status, 0, "workspaces-b must not accept shard flags");
for (const group of ["general-workspaces-b", "general-workspaces-c"]) {
test(`shard flags are rejected for the ${group} group`, () => {
const result = dryRun(["--mode", "general", "--group", group, "--shard-index", "0", "--shard-count", "3"]);
assert.notEqual(result.status, 0, `${group} must not accept shard flags`);
});
}
test("workspaces-c selects only the db project", () => {
const selected = dryRunJson(["--mode", "general", "--group", "general-workspaces-c"]);
assert.deepEqual(selected.workspaceProjects, ["@paperclipai/db"]);
assert.equal(selected.workspacesVitestShard, null);
});
test("workspace lanes cover every non-server project in the root Vitest configuration", () => {
@@ -118,7 +126,7 @@ test("workspace lanes cover every non-server project in the root Vitest configur
assert.ok(roots.includes("server"), "expected the explicit root Vitest project list");
const expected = roots.filter(root => root !== "server")
.map(root => JSON.parse(readFileSync(path.join(repoRoot, root, "package.json"), "utf8")).name).sort();
const actual = ["general-workspaces-a", "general-workspaces-b"]
const actual = ["general-workspaces-a", "general-workspaces-b", "general-workspaces-c"]
.flatMap(group => dryRunJson(["--mode", "general", "--group", group]).workspaceProjects).sort();
assert.deepEqual(actual, expected, "no configured project may be silently omitted or run twice");
});