mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-06 08:00:42 +00:00
ci: split channel contract shards further
This commit is contained in:
@@ -51,7 +51,7 @@ Local changed-lane logic lives in `scripts/changed-lanes.mjs` and is executed by
|
||||
|
||||
On pushes, the `checks` matrix adds the push-only `compat-node22` lane. On pull requests, that lane is skipped and the matrix stays focused on the normal test/channel lanes.
|
||||
|
||||
The slowest Node test families are split into include-file shards so each job stays small: channel contracts split registry and core coverage into four balanced shards each, auto-reply reply command tests split into four include-pattern shards, and the other large auto-reply reply prefix groups split into two shards each. `check-additional` also separates package-boundary compile/canary work from runtime topology gateway/architecture work.
|
||||
The slowest Node test families are split into include-file shards so each job stays small: channel contracts split registry and core coverage into eight balanced shards each, auto-reply reply command tests split into four include-pattern shards, and the other large auto-reply reply prefix groups split into two shards each. `check-additional` also separates package-boundary compile/canary work from runtime topology gateway/architecture work.
|
||||
|
||||
## Runners
|
||||
|
||||
|
||||
@@ -14,7 +14,7 @@ function listContractTestFiles(rootDir = "src/channels/plugins/contracts") {
|
||||
|
||||
export function createChannelContractTestShards() {
|
||||
const rootDir = "src/channels/plugins/contracts";
|
||||
const suffixes = ["a", "b", "c", "d"];
|
||||
const suffixes = ["a", "b", "c", "d", "e", "f", "g", "h"];
|
||||
const groups = Object.fromEntries(
|
||||
["registry", "core"].flatMap((family) =>
|
||||
suffixes.map((suffix) => [`checks-fast-contracts-channels-${family}-${suffix}`, []]),
|
||||
|
||||
@@ -16,54 +16,23 @@ function listContractTests(rootDir = "src/channels/plugins/contracts"): string[]
|
||||
|
||||
describe("scripts/lib/channel-contract-test-plan.mjs", () => {
|
||||
it("splits channel contracts into focused shards", () => {
|
||||
const suffixes = ["a", "b", "c", "d", "e", "f", "g", "h"];
|
||||
|
||||
expect(
|
||||
createChannelContractTestShards().map((shard) => ({
|
||||
checkName: shard.checkName,
|
||||
runtime: shard.runtime,
|
||||
task: shard.task,
|
||||
})),
|
||||
).toEqual([
|
||||
{
|
||||
checkName: "checks-fast-contracts-channels-registry-a",
|
||||
runtime: "node",
|
||||
task: "contracts-channels",
|
||||
},
|
||||
{
|
||||
checkName: "checks-fast-contracts-channels-registry-b",
|
||||
runtime: "node",
|
||||
task: "contracts-channels",
|
||||
},
|
||||
{
|
||||
checkName: "checks-fast-contracts-channels-registry-c",
|
||||
runtime: "node",
|
||||
task: "contracts-channels",
|
||||
},
|
||||
{
|
||||
checkName: "checks-fast-contracts-channels-registry-d",
|
||||
runtime: "node",
|
||||
task: "contracts-channels",
|
||||
},
|
||||
{
|
||||
checkName: "checks-fast-contracts-channels-core-a",
|
||||
runtime: "node",
|
||||
task: "contracts-channels",
|
||||
},
|
||||
{
|
||||
checkName: "checks-fast-contracts-channels-core-b",
|
||||
runtime: "node",
|
||||
task: "contracts-channels",
|
||||
},
|
||||
{
|
||||
checkName: "checks-fast-contracts-channels-core-c",
|
||||
runtime: "node",
|
||||
task: "contracts-channels",
|
||||
},
|
||||
{
|
||||
checkName: "checks-fast-contracts-channels-core-d",
|
||||
runtime: "node",
|
||||
task: "contracts-channels",
|
||||
},
|
||||
]);
|
||||
).toEqual(
|
||||
["registry", "core"].flatMap((family) =>
|
||||
suffixes.map((suffix) => ({
|
||||
checkName: `checks-fast-contracts-channels-${family}-${suffix}`,
|
||||
runtime: "node",
|
||||
task: "contracts-channels",
|
||||
})),
|
||||
),
|
||||
);
|
||||
});
|
||||
|
||||
it("covers every channel contract test exactly once", () => {
|
||||
|
||||
Reference in New Issue
Block a user