ci: merge short auto-reply node shards

This commit is contained in:
Peter Steinberger
2026-04-22 20:47:46 +01:00
parent 1e33d63f64
commit 6261f42ac0
3 changed files with 32 additions and 46 deletions

View File

@@ -65,22 +65,25 @@ function createAutoReplyReplySplitShards() {
}
}
const shardCounts = {
"auto-reply-reply-agent-runner": 1,
"auto-reply-reply-commands": 1,
"auto-reply-reply-dispatch": 1,
"auto-reply-reply-state-routing": 1,
const mergedGroups = {
"auto-reply-reply-agent-dispatch": [
...groups["auto-reply-reply-agent-runner"],
...groups["auto-reply-reply-dispatch"],
],
"auto-reply-reply-commands-state-routing": [
...groups["auto-reply-reply-commands"],
...groups["auto-reply-reply-state-routing"],
],
};
return Object.entries(groups).flatMap(([groupName, includePatterns]) => {
const shardCount = shardCounts[groupName] ?? 1;
return Array.from({ length: shardCount }, (_, index) => ({
shardName: `${groupName}-${String.fromCharCode(97 + index)}`,
return Object.entries(mergedGroups)
.map(([groupName, includePatterns]) => ({
configs: ["test/vitest/vitest.auto-reply-reply.config.ts"],
includePatterns: includePatterns.filter((_, fileIndex) => fileIndex % shardCount === index),
includePatterns,
requiresDist: false,
})).filter((shard) => shard.includePatterns.length > 0);
});
shardName: groupName,
}))
.filter((shard) => shard.includePatterns.length > 0);
}
const SPLIT_NODE_SHARDS = new Map([
@@ -127,13 +130,11 @@ const SPLIT_NODE_SHARDS = new Map([
"auto-reply",
[
{
shardName: "auto-reply-core",
configs: ["test/vitest/vitest.auto-reply-core.config.ts"],
requiresDist: false,
},
{
shardName: "auto-reply-top-level",
configs: ["test/vitest/vitest.auto-reply-top-level.config.ts"],
shardName: "auto-reply-core-top-level",
configs: [
"test/vitest/vitest.auto-reply-core.config.ts",
"test/vitest/vitest.auto-reply-top-level.config.ts",
],
requiresDist: false,
},
...createAutoReplyReplySplitShards(),