Files
reverse-engineering-anything/scripts/ci/test-selection.d.mts
T
morluto ff6d1d8142 ci: run only the affected portable tests on pull requests (#11346)
* ci: run only the affected portable tests on pull requests

Pull-request CI now runs static checks, the build and the portable tests a change affects, selected from test imports (through test-only helpers), same-stem and directory-scanning tests, leaf-owner boundary tests and tests that name a changed path. Shared boundaries, untraced inputs, empty selections and selections above 150 files fall back to the complete fast suite. Main pushes, schedules, releases and ci:full keep the complete suite. The portable report verifies the exact selected inventory and the CI required gate accepts a selected plan only for a fast pull request with code changes.

* ci: own leaf-adapter tests by name and keep subset summaries diagnostic
2026-11-16 03:37:15 +08:00

26 lines
806 B
TypeScript

export type TestSelectionPlan =
| {
readonly version: 2;
readonly mode: "full";
readonly reason: string;
readonly groups: readonly [];
}
| {
readonly version: 2;
readonly mode: "selected";
readonly reason: string;
readonly groups: readonly (readonly string[])[];
};
export function planTestSelection(request: {
readonly files: readonly string[];
readonly event: string;
readonly tier: string;
readonly code: boolean;
readonly snapshot: {
readonly list: () => readonly string[];
readonly read: (paths: readonly string[]) => ReadonlyMap<string, string>;
};
}): TestSelectionPlan;
export function parseTestSelection(value: unknown): TestSelectionPlan;
export function testShards(tier: string, plan: TestSelectionPlan): string[];