MCPcopy Create free account
hub / github.com/UsefulSoftwareCo/executor / planTargetShards

Function planTargetShards

e2e/scripts/ci-shard.ts:221–231  ·  view source on GitHub ↗
(
  target: CiTarget,
  e2eRoot: string,
)

Source from the content-addressed store, hash-verified

219
220/** Discovers and plans all shards for one configured target. */
221export const planTargetShards = async (
222 target: CiTarget,
223 e2eRoot: string,
224): Promise<readonly CiShardAssignment[]> => {
225 const paths = await discoverTargetTestFiles(target, e2eRoot);
226 const weighted = paths.map((path) => ({
227 path,
228 durationMs: durationForTestFile(target, path),
229 }));
230 return planCiShards(weighted, CI_SHARD_COUNTS[target]);
231};

Callers 2

run-ci-shard.tsFile · 0.90
ci-shard.test.tsFile · 0.90

Calls 3

discoverTargetTestFilesFunction · 0.85
durationForTestFileFunction · 0.85
planCiShardsFunction · 0.85

Tested by

no test coverage detected