mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-06 08:40:44 +00:00
ci: merge short auto-reply node shards
This commit is contained in:
@@ -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(),
|
||||
|
||||
Reference in New Issue
Block a user