mirror of
https://github.com/openclaw/openclaw.git
synced 2026-04-12 01:31:08 +00:00
ci: shard checks-node-test by vitest suite
This commit is contained in:
30
scripts/lib/ci-node-test-plan.mjs
Normal file
30
scripts/lib/ci-node-test-plan.mjs
Normal file
@@ -0,0 +1,30 @@
|
||||
import { fullSuiteVitestShards } from "../../test/vitest/vitest.test-shards.mjs";
|
||||
|
||||
const EXCLUDED_FULL_SUITE_SHARDS = new Set([
|
||||
"test/vitest/vitest.full-core-contracts.config.ts",
|
||||
"test/vitest/vitest.full-core-bundled.config.ts",
|
||||
"test/vitest/vitest.full-extensions.config.ts",
|
||||
]);
|
||||
|
||||
const EXCLUDED_PROJECT_CONFIGS = new Set(["test/vitest/vitest.channels.config.ts"]);
|
||||
|
||||
export function createNodeTestShards() {
|
||||
return fullSuiteVitestShards.flatMap((shard) => {
|
||||
if (EXCLUDED_FULL_SUITE_SHARDS.has(shard.config)) {
|
||||
return [];
|
||||
}
|
||||
|
||||
const configs = shard.projects.filter((config) => !EXCLUDED_PROJECT_CONFIGS.has(config));
|
||||
if (configs.length === 0) {
|
||||
return [];
|
||||
}
|
||||
|
||||
return [
|
||||
{
|
||||
checkName: `checks-node-test-${shard.name}`,
|
||||
shardName: shard.name,
|
||||
configs,
|
||||
},
|
||||
];
|
||||
});
|
||||
}
|
||||
Reference in New Issue
Block a user