ci: scope timing helpers to portable verification
This commit is contained in:
+6
-2
@@ -826,8 +826,12 @@ scripts also select it. Unrelated code edits retain the complete portable suite
|
|||||||
on the pinned Node version without starting four additional compatibility jobs.
|
on the pinned Node version without starting four additional compatibility jobs.
|
||||||
Full qualification retains every SQLite version.
|
Full qualification retains every SQLite version.
|
||||||
Shared process/contract/CLI boundaries, dependencies, other packaging inputs,
|
Shared process/contract/CLI boundaries, dependencies, other packaging inputs,
|
||||||
unknown paths, and changes to the planner select the full baseline. Package
|
unknown paths, and changes to the planner select the full baseline.
|
||||||
script-only edits select their owning verifier when its entrypoint is
|
CI timing collection, timing history, and test-report helper edits retain static
|
||||||
|
checks and the complete portable suite without selecting unrelated host/provider
|
||||||
|
lanes. Classification, qualification, gate, release receipt, and unknown CI
|
||||||
|
scripts keep the broad fallback.
|
||||||
|
Package script-only edits select their owning verifier when its entrypoint is
|
||||||
identifiable; unknown or shared script changes select everything. Android
|
identifiable; unknown or shared script changes select everything. Android
|
||||||
build-script edits retain the Linux suite and workflow validation; real Android
|
build-script edits retain the Linux suite and workflow validation; real Android
|
||||||
verification stays manual. Renames account for both paths.
|
verification stays manual. Renames account for both paths.
|
||||||
|
|||||||
@@ -25,6 +25,15 @@ const FIXTURE_SOURCES = [
|
|||||||
"tests/conformance/versions/**",
|
"tests/conformance/versions/**",
|
||||||
];
|
];
|
||||||
const READINESS_SOURCES = ["tests/conformance/readiness/**"];
|
const READINESS_SOURCES = ["tests/conformance/readiness/**"];
|
||||||
|
// These reporters affect CI output only; they do not select a host or provider
|
||||||
|
// verification lane when changed on their own.
|
||||||
|
const PORTABLE_CI_REPORTERS = new Set([
|
||||||
|
"scripts/ci/job-timings.mjs",
|
||||||
|
"scripts/ci/job-timings-batch.mjs",
|
||||||
|
"scripts/ci/test-report.mjs",
|
||||||
|
"scripts/ci/test-timing-reporter.mjs",
|
||||||
|
"scripts/ci/test-history.mjs",
|
||||||
|
]);
|
||||||
const matchesAny = (file, patterns) =>
|
const matchesAny = (file, patterns) =>
|
||||||
patterns.some((pattern) => matchesGlob(file, pattern));
|
patterns.some((pattern) => matchesGlob(file, pattern));
|
||||||
const selected = Object.fromEntries(flags.map((flag) => [flag, false]));
|
const selected = Object.fromEntries(flags.map((flag) => [flag, false]));
|
||||||
@@ -200,6 +209,7 @@ if (tier === "reused") {
|
|||||||
}
|
}
|
||||||
if (matchesAny(file, READINESS_SOURCES)) selected.readiness = true;
|
if (matchesAny(file, READINESS_SOURCES)) selected.readiness = true;
|
||||||
if (file.startsWith("tests/")) continue;
|
if (file.startsWith("tests/")) continue;
|
||||||
|
if (PORTABLE_CI_REPORTERS.has(file)) continue;
|
||||||
if (
|
if (
|
||||||
/^(src\/process\/|src\/filesystem\/|src\/contracts\/tool|src\/server\/createServer|src\/cli\.ts|scripts\/ci\/)/.test(
|
/^(src\/process\/|src\/filesystem\/|src\/contracts\/tool|src\/server\/createServer|src\/cli\.ts|scripts\/ci\/)/.test(
|
||||||
file,
|
file,
|
||||||
|
|||||||
@@ -137,6 +137,47 @@ it("keeps every translated root README and authored guide on the documentation l
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
it.each([
|
||||||
|
"job-timings.mjs",
|
||||||
|
"job-timings-batch.mjs",
|
||||||
|
"test-report.mjs",
|
||||||
|
"test-timing-reporter.mjs",
|
||||||
|
"test-history.mjs",
|
||||||
|
])(
|
||||||
|
"keeps portable CI reporter %s on static checks and portable tests",
|
||||||
|
async (name) => {
|
||||||
|
const { directory, base } = await fixture();
|
||||||
|
const head = await change(directory, [`scripts/ci/${name}`]);
|
||||||
|
const plan = await classify(directory, base, head);
|
||||||
|
const { CI_FLAGS } = await loadScopes();
|
||||||
|
expect(plan.code).toBe(true);
|
||||||
|
for (const flag of CI_FLAGS)
|
||||||
|
if (flag !== "code") expect(plan[flag]).toBe(false);
|
||||||
|
},
|
||||||
|
);
|
||||||
|
|
||||||
|
it("preserves a provider lane when a portable CI reporter changes with provider source", async () => {
|
||||||
|
const { directory, base } = await fixture();
|
||||||
|
const head = await change(directory, [
|
||||||
|
"scripts/ci/test-report.mjs",
|
||||||
|
"src/evm/Example.ts",
|
||||||
|
]);
|
||||||
|
expect(await classify(directory, base, head)).toMatchObject({
|
||||||
|
code: true,
|
||||||
|
evm: true,
|
||||||
|
browser: false,
|
||||||
|
package: false,
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
it("keeps unknown CI scripts on complete qualification", async () => {
|
||||||
|
const { directory, base } = await fixture();
|
||||||
|
const head = await change(directory, ["scripts/ci/new-qualification.mjs"]);
|
||||||
|
const plan = await classify(directory, base, head);
|
||||||
|
const { CI_FLAGS } = await loadScopes();
|
||||||
|
for (const flag of CI_FLAGS) expect(plan[flag]).toBe(true);
|
||||||
|
});
|
||||||
|
|
||||||
it("does not charge a documentation PR for unrelated implementation updates on main", async () => {
|
it("does not charge a documentation PR for unrelated implementation updates on main", async () => {
|
||||||
const { directory, base } = await fixture();
|
const { directory, base } = await fixture();
|
||||||
await git(directory, ["switch", "-c", "docs/change"]);
|
await git(directory, ["switch", "-c", "docs/change"]);
|
||||||
|
|||||||
Reference in New Issue
Block a user