Files
openclaw/scripts/lib/ci-node-test-plan.d.mts
Peter Steinberger b78cf56349 improve(ci): persist warm Vitest and Node caches (#109425)
* perf(ci): harden persistent test caches

* ci: document trusted cache cleanup trigger

* ci: harden composite cache inputs

* perf(ci): isolate Node build bytecode cache
2026-07-16 17:22:28 -07:00

43 lines
1.2 KiB
TypeScript

export type NodeTestShardGroup = {
shard_name: string;
configs: string[];
includePatterns?: string[];
requiresDist: boolean;
runner: string;
env?: Record<string, string>;
};
export type NodeTestShard = {
checkName: string;
shardName: string;
configs: string[];
runner: string;
requiresDist: boolean;
includePatterns?: string[];
env?: Record<string, string>;
groups?: NodeTestShardGroup[];
timeoutMinutes?: number;
planConcurrency?: number;
saveVitestFsCache?: boolean;
};
export type NodeTestPlanOptions = {
includeReleaseOnlyPluginShards?: boolean;
compact?: boolean;
compactGroupCount?: number;
compactWholeGroupCount?: number;
};
export type CompactNodeTestShard = Omit<NodeTestShard, "configs" | "groups"> & {
groups: NodeTestShardGroup[];
};
export function createNodeTestShards(options?: NodeTestPlanOptions): NodeTestShard[];
export function createNodeTestShardBundles(
options: NodeTestPlanOptions & { compact: true },
): CompactNodeTestShard[];
export function createNodeTestShardBundles(options?: NodeTestPlanOptions): NodeTestShard[];
export function assignVitestFsCacheWriter<T extends Pick<NodeTestShard, "shardName" | "groups">>(
shards: T[],
): Array<T & { saveVitestFsCache: boolean }>;