mirror of
https://github.com/openclaw/openclaw.git
synced 2026-08-12 21:53:00 -06:00
fix(ci): run every changed-scope routing suite (#120625)
This commit is contained in:
@@ -1639,10 +1639,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/ci-changed-node-test-plan.test.ts test/scripts/ci-run-node-test-shard.test.ts test/scripts/ci-workflow-guards.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-changed-node-test-plan.test.ts test/scripts/ci-run-node-test-shard.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/ci-changed-node-test-plan.test.ts test/scripts/ci-run-node-test-shard.test.ts test/scripts/ci-workflow-guards.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-changed-node-test-plan.test.ts test/scripts/ci-run-node-test-shard.test.ts test/scripts/ci-workflow-guards.test.ts test/scripts/run-vitest.test.ts test/scripts/test-projects.test.ts
|
||||
;;
|
||||
max-lines-ratchet)
|
||||
if ! has_package_script "check:max-lines-ratchet"; then
|
||||
|
||||
@@ -84,7 +84,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|lib\/(?:changed-path-facts|ci-changed-node-test-plan))\.d\.mts$|scripts\/lib\/(?:changed-path-facts|ci-changed-node-test-plan)\.mjs$|src\/commands\/status\.scan-result\.test\.ts$|src\/scripts\/ci-changed-scope\.test\.ts$|test\/scripts\/(?:changed-lanes|changed-path-facts|ci-changed-node-test-plan|run-vitest|test-projects)\.test\.ts$)/;
|
||||
/^(scripts\/(?:ci-changed-scope|check-changed|run-vitest|test-projects(?:\.test-support)?)\.mjs$|scripts\/(?:test-projects\.test-support|lib\/(?:changed-path-facts|ci-changed-node-test-plan))\.d\.mts$|scripts\/lib\/(?:changed-path-facts|ci-changed-node-test-plan)\.mjs$|src\/commands\/status\.scan-result\.test\.ts$|src\/scripts\/ci-changed-scope(?:\.[^/]+)?\.test\.ts$|test\/scripts\/(?:changed-lanes|changed-path-facts|ci-changed-node-test-plan|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}`,
|
||||
);
|
||||
|
||||
@@ -1829,6 +1829,12 @@ const pluginPrerelease = "plugin-prerelease-test-plan";
|
||||
const releaseCheck = "test/release-check.test.ts";
|
||||
const installDocker = "test-install-sh-docker";
|
||||
const changedScope = "src/scripts/ci-changed-scope.test.ts";
|
||||
const changedScopeTests = [
|
||||
"src/scripts/ci-changed-scope.control-ui.test.ts",
|
||||
"src/scripts/ci-changed-scope.native-i18n.test.ts",
|
||||
changedScope,
|
||||
"src/scripts/ci-changed-scope.windows.test.ts",
|
||||
];
|
||||
const dockerCache = "src/docker-build-cache.test.ts";
|
||||
const dockerDigests = "src/docker-image-digests.test.ts";
|
||||
const openaiChatToolsE2e = "test/e2e/qa-lab/runtime/openai-compatible-chat-tools.e2e.test.ts";
|
||||
@@ -2092,7 +2098,7 @@ const SEMANTIC_TOOLING_TARGET_PATTERNS = [
|
||||
[/^\.github\/actions\/ensure-base-commit\/action\.yml$/u, [workflowGuards]],
|
||||
[/^tsconfig\.scripts\.json$/u, ["changed-lanes", "test-projects"]],
|
||||
[/^scripts\/test-projects\.test-support\.mjs$/u, ["test-projects"]],
|
||||
[/^scripts\/ci-changed-scope\.mjs$/u, [changedScope, "control-ui-i18n"]],
|
||||
[/^scripts\/ci-changed-scope\.mjs$/u, [...changedScopeTests, "control-ui-i18n"]],
|
||||
[/^scripts\/check-changed\.mjs$/u, ["changed-lanes"]],
|
||||
[
|
||||
new RegExp(
|
||||
|
||||
@@ -899,7 +899,10 @@ describe("detectChangedScope", () => {
|
||||
"scripts/run-vitest.mjs",
|
||||
"scripts/test-projects.test-support.d.mts",
|
||||
"src/commands/status.scan-result.test.ts",
|
||||
"src/scripts/ci-changed-scope.control-ui.test.ts",
|
||||
"src/scripts/ci-changed-scope.native-i18n.test.ts",
|
||||
"src/scripts/ci-changed-scope.test.ts",
|
||||
"src/scripts/ci-changed-scope.windows.test.ts",
|
||||
"test/scripts/changed-lanes.test.ts",
|
||||
"test/scripts/run-vitest.test.ts",
|
||||
"test/scripts/test-projects.test.ts",
|
||||
|
||||
@@ -6463,6 +6463,7 @@ printf '%s\n' "\${CURL_SUCCESS_IP:-203.0.113.7}"
|
||||
path: ".artifacts/qa-e2e/smoke-ci-profile-${{ matrix.slug }}/",
|
||||
"if-no-files-found": "warn",
|
||||
});
|
||||
expect(runStep.run.match(/src\/scripts\/ci-changed-scope\*\.test\.ts/g)).toHaveLength(2);
|
||||
expect(runStep.run.match(/test\/scripts\/ci-workflow-guards\.test\.ts/g)?.length).toBe(2);
|
||||
expect(runStep.run.match(/test\/scripts\/ci-changed-node-test-plan\.test\.ts/g)?.length).toBe(
|
||||
2,
|
||||
|
||||
@@ -1302,9 +1302,14 @@ describe("scripts/test-projects changed-target routing", () => {
|
||||
});
|
||||
|
||||
it("keeps CI, dependency, and docs tooling edits on owner tests", () => {
|
||||
const changedScopeTestFamily = fs
|
||||
.readdirSync("src/scripts")
|
||||
.filter((file) => /^ci-changed-scope(?:\.[^/]+)?\.test\.ts$/u.test(file))
|
||||
.map((file) => `src/scripts/${file}`)
|
||||
.toSorted((left, right) => left.localeCompare(right));
|
||||
expectChangedTargets(
|
||||
["scripts/ci-changed-scope.mjs"],
|
||||
["src/scripts/ci-changed-scope.test.ts", "test/scripts/control-ui-i18n.test.ts"],
|
||||
[...changedScopeTestFamily, "test/scripts/control-ui-i18n.test.ts"],
|
||||
);
|
||||
|
||||
expectChangedTargets(
|
||||
|
||||
Reference in New Issue
Block a user