mirror of
https://github.com/openclaw/openclaw.git
synced 2026-06-22 12:38:09 +00:00
fix(ci): keep ci workflow edits off fast-only routing
This commit is contained in:
4
.github/workflows/ci.yml
vendored
4
.github/workflows/ci.yml
vendored
@@ -850,10 +850,10 @@ jobs:
|
||||
;;
|
||||
contracts-plugins-ci-routing)
|
||||
pnpm test:contracts:plugins
|
||||
pnpm test src/commands/status.scan-result.test.ts src/scripts/ci-changed-scope.test.ts test/scripts/changed-lanes.test.ts test/scripts/run-vitest.test.ts test/scripts/test-projects.test.ts
|
||||
pnpm test src/commands/status.scan-result.test.ts src/scripts/ci-changed-scope.test.ts test/scripts/changed-lanes.test.ts test/scripts/ci-workflow-guards.test.ts test/scripts/run-vitest.test.ts test/scripts/test-projects.test.ts
|
||||
;;
|
||||
ci-routing)
|
||||
pnpm test src/commands/status.scan-result.test.ts src/scripts/ci-changed-scope.test.ts test/scripts/changed-lanes.test.ts test/scripts/run-vitest.test.ts test/scripts/test-projects.test.ts
|
||||
pnpm test src/commands/status.scan-result.test.ts src/scripts/ci-changed-scope.test.ts test/scripts/changed-lanes.test.ts test/scripts/ci-workflow-guards.test.ts test/scripts/run-vitest.test.ts test/scripts/test-projects.test.ts
|
||||
;;
|
||||
bun-launcher)
|
||||
OPENCLAW_TEST_BUN_LAUNCHER=1 pnpm test test/openclaw-launcher.e2e.test.ts
|
||||
|
||||
@@ -57,7 +57,7 @@ const FAST_INSTALL_SMOKE_RUNTIME_SCOPE_RE =
|
||||
const NODE_FAST_PLUGIN_CONTRACT_SCOPE_RE =
|
||||
/^src\/plugins\/contracts\/(?:inventory\/bundled-capability-metadata|registry|tts-contract-suites)\.ts$/;
|
||||
const NODE_FAST_CI_ROUTING_SCOPE_RE =
|
||||
/^(scripts\/(?:ci-changed-scope|check-changed|run-vitest|test-projects(?:\.test-support)?)\.mjs$|scripts\/test-projects\.test-support\.d\.mts$|src\/commands\/status\.scan-result\.test\.ts$|src\/scripts\/ci-changed-scope\.test\.ts$|test\/scripts\/(?:changed-lanes|run-vitest|test-projects)\.test\.ts$|\.github\/workflows\/ci\.yml$)/;
|
||||
/^(scripts\/(?:ci-changed-scope|check-changed|run-vitest|test-projects(?:\.test-support)?)\.mjs$|scripts\/test-projects\.test-support\.d\.mts$|src\/commands\/status\.scan-result\.test\.ts$|src\/scripts\/ci-changed-scope\.test\.ts$|test\/scripts\/(?:changed-lanes|run-vitest|test-projects)\.test\.ts$)/;
|
||||
const NODE_FAST_SCOPE_RE = new RegExp(
|
||||
`${NODE_FAST_PLUGIN_CONTRACT_SCOPE_RE.source}|${NODE_FAST_CI_ROUTING_SCOPE_RE.source}`,
|
||||
);
|
||||
|
||||
@@ -400,6 +400,7 @@ const PRECISE_SOURCE_TEST_TARGETS = new Map([
|
||||
const BROAD_ONLY_TEST_HELPERS = new Set(["test/helpers/poll.ts"]);
|
||||
const TOOLING_SOURCE_TEST_TARGETS = new Map([
|
||||
[".crabbox.yaml", ["test/scripts/package-acceptance-workflow.test.ts"]],
|
||||
[".github/workflows/ci.yml", ["test/scripts/ci-workflow-guards.test.ts"]],
|
||||
[
|
||||
".github/workflows/ci-check-testbox.yml",
|
||||
["test/scripts/ci-workflow-guards.test.ts", "test/scripts/package-acceptance-workflow.test.ts"],
|
||||
|
||||
@@ -689,7 +689,6 @@ describe("detectChangedScope", () => {
|
||||
it("identifies CI routing changes as fast Node-only CI scope", () => {
|
||||
expect(
|
||||
detectNodeFastScope([
|
||||
".github/workflows/ci.yml",
|
||||
"scripts/check-changed.mjs",
|
||||
"scripts/ci-changed-scope.mjs",
|
||||
"scripts/run-vitest.mjs",
|
||||
@@ -708,6 +707,14 @@ describe("detectChangedScope", () => {
|
||||
});
|
||||
});
|
||||
|
||||
it("keeps CI workflow edits off fast-only scope so native lanes can run", () => {
|
||||
expect(detectNodeFastScope([".github/workflows/ci.yml"])).toEqual({
|
||||
runFastOnly: false,
|
||||
runPluginContracts: false,
|
||||
runCiRouting: false,
|
||||
});
|
||||
});
|
||||
|
||||
it("keeps broad source changes on the full Node CI scope", () => {
|
||||
expect(
|
||||
detectNodeFastScope([
|
||||
|
||||
@@ -345,6 +345,18 @@ describe("ci workflow guards", () => {
|
||||
});
|
||||
});
|
||||
|
||||
it("keeps workflow guards in fast CI-routing checks", () => {
|
||||
const workflow = readCiWorkflow();
|
||||
const fastCoreJob = workflow.jobs["checks-fast-core"];
|
||||
const runStep = fastCoreJob.steps.find(
|
||||
(step) => step.name === "Run ${{ matrix.task }} (${{ matrix.runtime }})",
|
||||
);
|
||||
|
||||
expect(runStep.run).toContain("contracts-plugins-ci-routing)");
|
||||
expect(runStep.run).toContain("ci-routing)");
|
||||
expect(runStep.run.match(/test\/scripts\/ci-workflow-guards\.test\.ts/g)?.length).toBe(2);
|
||||
});
|
||||
|
||||
it("keeps push docs validation ClawHub-backed", () => {
|
||||
const workflow = readFileSync(".github/workflows/docs.yml", "utf8");
|
||||
|
||||
|
||||
@@ -484,6 +484,13 @@ describe("scripts/test-projects changed-target routing", () => {
|
||||
});
|
||||
});
|
||||
|
||||
it("keeps CI workflow edits on workflow guard tests", () => {
|
||||
expect(resolveChangedTestTargetPlan([".github/workflows/ci.yml"])).toEqual({
|
||||
mode: "targets",
|
||||
targets: ["test/scripts/ci-workflow-guards.test.ts"],
|
||||
});
|
||||
});
|
||||
|
||||
it("keeps Crabbox and Testbox workflow edits on workflow regression tests", () => {
|
||||
for (const workflowPath of [
|
||||
".github/workflows/ci-check-testbox.yml",
|
||||
|
||||
Reference in New Issue
Block a user