mirror of
https://github.com/morluto/rea
synced 2026-10-25 22:08:11 -04:00
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.
|
||||
Full qualification retains every SQLite version.
|
||||
Shared process/contract/CLI boundaries, dependencies, other packaging inputs,
|
||||
unknown paths, and changes to the planner select the full baseline. Package
|
||||
script-only edits select their owning verifier when its entrypoint is
|
||||
unknown paths, and changes to the planner select the full baseline.
|
||||
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
|
||||
build-script edits retain the Linux suite and workflow validation; real Android
|
||||
verification stays manual. Renames account for both paths.
|
||||
|
||||
@@ -25,6 +25,15 @@ const FIXTURE_SOURCES = [
|
||||
"tests/conformance/versions/**",
|
||||
];
|
||||
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) =>
|
||||
patterns.some((pattern) => matchesGlob(file, pattern));
|
||||
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 (file.startsWith("tests/")) continue;
|
||||
if (PORTABLE_CI_REPORTERS.has(file)) continue;
|
||||
if (
|
||||
/^(src\/process\/|src\/filesystem\/|src\/contracts\/tool|src\/server\/createServer|src\/cli\.ts|scripts\/ci\/)/.test(
|
||||
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 () => {
|
||||
const { directory, base } = await fixture();
|
||||
await git(directory, ["switch", "-c", "docs/change"]);
|
||||
|
||||
Reference in New Issue
Block a user