fix(ci): keep ci workflow edits off fast-only routing · openclaw/openclaw@76658cd
vincentkoc
·
2026-06-17
·
via Recent Commits to openclaw:main
| Original file line number | Diff line number | Diff line change |
|---|
@@ -850,10 +850,10 @@ jobs:
|
850 | 850 | ;; |
851 | 851 | contracts-plugins-ci-routing) |
852 | 852 | pnpm test:contracts:plugins |
853 | | - 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 |
| 853 | + 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 |
854 | 854 | ;; |
855 | 855 | ci-routing) |
856 | | - 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 |
| 856 | + 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 |
857 | 857 | ;; |
858 | 858 | bun-launcher) |
859 | 859 | OPENCLAW_TEST_BUN_LAUNCHER=1 pnpm test test/openclaw-launcher.e2e.test.ts |
|
| Original file line number | Diff line number | Diff line change |
|---|
@@ -57,7 +57,7 @@ const FAST_INSTALL_SMOKE_RUNTIME_SCOPE_RE =
|
57 | 57 | const NODE_FAST_PLUGIN_CONTRACT_SCOPE_RE = |
58 | 58 | /^src\/plugins\/contracts\/(?:inventory\/bundled-capability-metadata|registry|tts-contract-suites)\.ts$/; |
59 | 59 | const NODE_FAST_CI_ROUTING_SCOPE_RE = |
60 | | -/^(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$)/; |
| 60 | +/^(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$)/; |
61 | 61 | const NODE_FAST_SCOPE_RE = new RegExp( |
62 | 62 | `${NODE_FAST_PLUGIN_CONTRACT_SCOPE_RE.source}|${NODE_FAST_CI_ROUTING_SCOPE_RE.source}`, |
63 | 63 | ); |
|
| Original file line number | Diff line number | Diff line change |
|---|
@@ -400,6 +400,7 @@ const PRECISE_SOURCE_TEST_TARGETS = new Map([
|
400 | 400 | const BROAD_ONLY_TEST_HELPERS = new Set(["test/helpers/poll.ts"]); |
401 | 401 | const TOOLING_SOURCE_TEST_TARGETS = new Map([ |
402 | 402 | [".crabbox.yaml", ["test/scripts/package-acceptance-workflow.test.ts"]], |
| 403 | +[".github/workflows/ci.yml", ["test/scripts/ci-workflow-guards.test.ts"]], |
403 | 404 | [ |
404 | 405 | ".github/workflows/ci-check-testbox.yml", |
405 | 406 | ["test/scripts/ci-workflow-guards.test.ts", "test/scripts/package-acceptance-workflow.test.ts"], |
|
| Original file line number | Diff line number | Diff line change |
|---|
@@ -689,7 +689,6 @@ describe("detectChangedScope", () => {
|
689 | 689 | it("identifies CI routing changes as fast Node-only CI scope", () => { |
690 | 690 | expect( |
691 | 691 | detectNodeFastScope([ |
692 | | -".github/workflows/ci.yml", |
693 | 692 | "scripts/check-changed.mjs", |
694 | 693 | "scripts/ci-changed-scope.mjs", |
695 | 694 | "scripts/run-vitest.mjs", |
@@ -708,6 +707,14 @@ describe("detectChangedScope", () => {
|
708 | 707 | }); |
709 | 708 | }); |
710 | 709 | |
| 710 | +it("keeps CI workflow edits off fast-only scope so native lanes can run", () => { |
| 711 | +expect(detectNodeFastScope([".github/workflows/ci.yml"])).toEqual({ |
| 712 | +runFastOnly: false, |
| 713 | +runPluginContracts: false, |
| 714 | +runCiRouting: false, |
| 715 | +}); |
| 716 | +}); |
| 717 | + |
711 | 718 | it("keeps broad source changes on the full Node CI scope", () => { |
712 | 719 | expect( |
713 | 720 | detectNodeFastScope([ |
|
| Original file line number | Diff line number | Diff line change |
|---|
@@ -345,6 +345,18 @@ describe("ci workflow guards", () => {
|
345 | 345 | }); |
346 | 346 | }); |
347 | 347 | |
| 348 | +it("keeps workflow guards in fast CI-routing checks", () => { |
| 349 | +const workflow = readCiWorkflow(); |
| 350 | +const fastCoreJob = workflow.jobs["checks-fast-core"]; |
| 351 | +const runStep = fastCoreJob.steps.find( |
| 352 | +(step) => step.name === "Run ${{ matrix.task }} (${{ matrix.runtime }})", |
| 353 | +); |
| 354 | + |
| 355 | +expect(runStep.run).toContain("contracts-plugins-ci-routing)"); |
| 356 | +expect(runStep.run).toContain("ci-routing)"); |
| 357 | +expect(runStep.run.match(/test\/scripts\/ci-workflow-guards\.test\.ts/g)?.length).toBe(2); |
| 358 | +}); |
| 359 | + |
348 | 360 | it("keeps push docs validation ClawHub-backed", () => { |
349 | 361 | const workflow = readFileSync(".github/workflows/docs.yml", "utf8"); |
350 | 362 | |
|
| Original file line number | Diff line number | Diff line change |
|---|
@@ -484,6 +484,13 @@ describe("scripts/test-projects changed-target routing", () => {
|
484 | 484 | }); |
485 | 485 | }); |
486 | 486 | |
| 487 | +it("keeps CI workflow edits on workflow guard tests", () => { |
| 488 | +expect(resolveChangedTestTargetPlan([".github/workflows/ci.yml"])).toEqual({ |
| 489 | +mode: "targets", |
| 490 | +targets: ["test/scripts/ci-workflow-guards.test.ts"], |
| 491 | +}); |
| 492 | +}); |
| 493 | + |
487 | 494 | it("keeps Crabbox and Testbox workflow edits on workflow regression tests", () => { |
488 | 495 | for (const workflowPath of [ |
489 | 496 | ".github/workflows/ci-check-testbox.yml", |
|
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。