



























@@ -441,22 +441,172 @@ const INSTALL_DOCKERFILE_TEST_TARGETS = [
441441"test/scripts/test-install-sh-docker.test.ts",
442442];
443443const LIVE_MEDIA_RUNNER_IMAGE_TEST_TARGETS = ["test/scripts/package-acceptance-workflow.test.ts"];
444+const GITHUB_YAML_PINNING_GUARD_TEST_TARGETS = ["test/scripts/ci-workflow-guards.test.ts"];
445+const GITHUB_WORKFLOW_OWNER_TEST_TARGETS = new Map([
446+[
447+".github/workflows/ci-build-artifacts-testbox.yml",
448+["test/scripts/package-acceptance-workflow.test.ts"],
449+],
450+[
451+".github/workflows/ci-check-arm-testbox.yml",
452+["test/scripts/package-acceptance-workflow.test.ts"],
453+],
454+[
455+".github/workflows/ci-check-testbox.yml",
456+["test/scripts/changed-lanes.test.ts", "test/scripts/package-acceptance-workflow.test.ts"],
457+],
458+[
459+".github/workflows/ci.yml",
460+[
461+"test/scripts/changed-lanes.test.ts",
462+"test/scripts/check-workflows.test.ts",
463+"test/scripts/plugin-contract-test-plan.test.ts",
464+"test/scripts/plugin-prerelease-test-plan.test.ts",
465+"test/scripts/verify-pr-hosted-gates.test.ts",
466+],
467+],
468+[".github/workflows/crabbox-hydrate.yml", ["test/scripts/package-acceptance-workflow.test.ts"]],
469+[".github/workflows/dependency-guard.yml", ["test/scripts/dependency-guard-workflow.test.ts"]],
470+[".github/workflows/docker-release.yml", ["src/dockerfile.test.ts"]],
471+[
472+".github/workflows/full-release-validation.yml",
473+[
474+"src/dockerfile.test.ts",
475+"test/scripts/package-acceptance-workflow.test.ts",
476+"test/scripts/plugin-prerelease-test-plan.test.ts",
477+],
478+],
479+[".github/workflows/install-smoke.yml", ["test/scripts/test-install-sh-docker.test.ts"]],
480+[
481+".github/workflows/ios-periphery-comment.yml",
482+["test/scripts/ios-periphery-comment-workflow.test.ts"],
483+],
484+[".github/workflows/ios-periphery.yml", ["test/scripts/ios-periphery-comment-workflow.test.ts"]],
485+[
486+".github/workflows/live-media-runner-image.yml",
487+["test/scripts/package-acceptance-workflow.test.ts"],
488+],
489+[".github/workflows/macos-release.yml", ["test/scripts/package-acceptance-workflow.test.ts"]],
490+[
491+".github/workflows/mantis-telegram-desktop-proof.yml",
492+["test/scripts/mantis-telegram-desktop-proof-workflow.test.ts"],
493+],
494+[
495+".github/workflows/mantis-telegram-live.yml",
496+[
497+"test/scripts/mantis-telegram-desktop-proof-workflow.test.ts",
498+"test/scripts/package-acceptance-workflow.test.ts",
499+],
500+],
501+[
502+".github/workflows/npm-telegram-beta-e2e.yml",
503+["test/scripts/package-acceptance-workflow.test.ts"],
504+],
505+[
506+".github/workflows/openclaw-cross-os-release-checks-reusable.yml",
507+[
508+"test/scripts/openclaw-cross-os-release-checks.test.ts",
509+"test/scripts/openclaw-cross-os-release-workflow.test.ts",
510+"test/scripts/package-acceptance-workflow.test.ts",
511+],
512+],
513+[
514+".github/workflows/openclaw-live-and-e2e-checks-reusable.yml",
515+[
516+"test/scripts/package-acceptance-workflow.test.ts",
517+"test/scripts/release-workflow-matrix-plan.test.ts",
518+"test/scripts/test-install-sh-docker.test.ts",
519+],
520+],
521+[
522+".github/workflows/openclaw-npm-release.yml",
523+[
524+"test/openclaw-npm-postpublish-verify.test.ts",
525+"test/scripts/package-acceptance-workflow.test.ts",
526+],
527+],
528+[
529+".github/workflows/openclaw-performance.yml",
530+["test/scripts/openclaw-performance-workflow.test.ts"],
531+],
532+[
533+".github/workflows/openclaw-release-checks.yml",
534+[
535+"test/scripts/openclaw-cross-os-release-checks.test.ts",
536+"test/scripts/package-acceptance-workflow.test.ts",
537+"test/scripts/plugin-prerelease-test-plan.test.ts",
538+"test/scripts/test-install-sh-docker.test.ts",
539+],
540+],
541+[
542+".github/workflows/openclaw-release-publish.yml",
543+["test/scripts/package-acceptance-workflow.test.ts"],
544+],
545+[
546+".github/workflows/openclaw-scheduled-live-checks.yml",
547+["test/scripts/package-acceptance-workflow.test.ts"],
548+],
549+[
550+".github/workflows/openclaw-stable-main-closeout.yml",
551+["test/scripts/package-acceptance-workflow.test.ts"],
552+],
553+[
554+".github/workflows/package-acceptance.yml",
555+["test/scripts/package-acceptance-workflow.test.ts"],
556+],
557+[
558+".github/workflows/plugin-clawhub-new.yml",
559+["test/scripts/package-acceptance-workflow.test.ts"],
560+],
561+[
562+".github/workflows/plugin-clawhub-release.yml",
563+["test/scripts/package-acceptance-workflow.test.ts"],
564+],
565+[
566+".github/workflows/plugin-npm-release.yml",
567+["test/scripts/package-acceptance-workflow.test.ts"],
568+],
569+[".github/workflows/plugin-prerelease.yml", ["test/scripts/plugin-prerelease-test-plan.test.ts"]],
570+[
571+".github/workflows/qa-live-transports-convex.yml",
572+["test/scripts/package-acceptance-workflow.test.ts"],
573+],
574+[
575+".github/workflows/sandbox-common-smoke.yml",
576+["test/scripts/sandbox-common-smoke-workflow.test.ts"],
577+],
578+[
579+".github/workflows/security-sensitive-guard.yml",
580+["test/scripts/security-sensitive-guard-workflow.test.ts"],
581+],
582+[".github/workflows/tui-pty.yml", ["test/scripts/package-acceptance-workflow.test.ts"]],
583+[".github/workflows/update-migration.yml", ["test/scripts/package-acceptance-workflow.test.ts"]],
584+[
585+".github/workflows/website-installer-sync.yml",
586+["test/scripts/website-installer-sync-workflow.test.ts"],
587+],
588+[
589+".github/workflows/windows-node-release.yml",
590+["test/scripts/package-acceptance-workflow.test.ts"],
591+],
592+[".github/workflows/windows-testbox-probe.yml", ["test/scripts/check-workflows.test.ts"]],
593+]);
444594const TOOLING_SOURCE_TEST_TARGETS = new Map([
445595["Dockerfile", ROOT_DOCKERFILE_TEST_TARGETS],
446596[".crabbox.yaml", ["test/scripts/package-acceptance-workflow.test.ts"]],
447597[".github/actions/detect-docs-changes/action.yml", ["test/scripts/ci-workflow-guards.test.ts"]],
448598[
449599".github/actions/docker-e2e-plan/action.yml",
450-["test/scripts/package-acceptance-workflow.test.ts"],
600+["test/scripts/package-acceptance-workflow.test.ts", "test/scripts/ci-workflow-guards.test.ts"],
451601],
452602[".github/actions/ensure-base-commit/action.yml", ["test/scripts/ci-workflow-guards.test.ts"]],
453603[
454604".github/actions/setup-node-env/action.yml",
455-["test/scripts/package-acceptance-workflow.test.ts"],
605+["test/scripts/package-acceptance-workflow.test.ts", "test/scripts/ci-workflow-guards.test.ts"],
456606],
457607[
458608".github/actions/setup-pnpm-store-cache/action.yml",
459-["test/scripts/package-acceptance-workflow.test.ts"],
609+["test/scripts/package-acceptance-workflow.test.ts", "test/scripts/ci-workflow-guards.test.ts"],
460610],
461611[".github/images/live-media-runner/Dockerfile", LIVE_MEDIA_RUNNER_IMAGE_TEST_TARGETS],
462612[".github/workflows/ci.yml", ["test/scripts/ci-workflow-guards.test.ts"]],
@@ -476,10 +626,13 @@ const TOOLING_SOURCE_TEST_TARGETS = new Map([
476626".github/workflows/crabbox-hydrate.yml",
477627["test/scripts/ci-workflow-guards.test.ts", "test/scripts/package-acceptance-workflow.test.ts"],
478628],
479-[".github/workflows/live-media-runner-image.yml", LIVE_MEDIA_RUNNER_IMAGE_TEST_TARGETS],
629+[
630+".github/workflows/live-media-runner-image.yml",
631+[...LIVE_MEDIA_RUNNER_IMAGE_TEST_TARGETS, "test/scripts/ci-workflow-guards.test.ts"],
632+],
480633[
481634".github/workflows/openclaw-live-and-e2e-checks-reusable.yml",
482-["test/scripts/package-acceptance-workflow.test.ts"],
635+["test/scripts/package-acceptance-workflow.test.ts", "test/scripts/ci-workflow-guards.test.ts"],
483636],
484637[
485638".github/workflows/openclaw-release-checks.yml",
@@ -2814,6 +2967,20 @@ function resolveParallelsToolingTestTargets(changedPath) {
28142967return targets;
28152968}
281629692970+function resolveGithubYamlGuardTargets(changedPath) {
2971+if (/^\.github\/workflows\/[^/]+\.ya?ml$/u.test(changedPath)) {
2972+return GITHUB_YAML_PINNING_GUARD_TEST_TARGETS;
2973+}
2974+if (/^\.github\/actions\/.+\.ya?ml$/u.test(changedPath)) {
2975+return GITHUB_YAML_PINNING_GUARD_TEST_TARGETS;
2976+}
2977+return null;
2978+}
2979+2980+function resolveGithubWorkflowOwnerTargets(changedPath) {
2981+return GITHUB_WORKFLOW_OWNER_TEST_TARGETS.get(changedPath) ?? null;
2982+}
2983+28172984function resolveToolingTestTargets(changedPath, cwd = process.cwd()) {
28182985const explicitTargets =
28192986TOOLING_SOURCE_TEST_TARGETS.get(changedPath) ??
@@ -2823,15 +2990,19 @@ function resolveToolingTestTargets(changedPath, cwd = process.cwd()) {
28232990resolveDocsI18nGoTargets(changedPath) ??
28242991resolveK8sManifestTargets(changedPath) ??
28252992resolveParallelsToolingTestTargets(changedPath);
2993+const githubWorkflowOwnerTargets = resolveGithubWorkflowOwnerTargets(changedPath);
2994+const githubYamlGuardTargets = resolveGithubYamlGuardTargets(changedPath);
28262995const conventionalTargets = resolveConventionalToolingTestTargets(changedPath, cwd);
2827-if (explicitTargets && conventionalTargets) {
2828-return uniqueOrdered([...explicitTargets, ...conventionalTargets]);
2996+const targets = [
2997+ ...(explicitTargets ?? []),
2998+ ...(githubWorkflowOwnerTargets ?? []),
2999+ ...(githubYamlGuardTargets ?? []),
3000+ ...(conventionalTargets ?? []),
3001+];
3002+if (targets.length > 0) {
3003+return uniqueOrdered(targets);
28293004}
2830-return (
2831-explicitTargets ??
2832-conventionalTargets ??
2833-(isToolingScriptPath(changedPath) ? [TOOLING_VITEST_CONFIG] : null)
2834-);
3005+return isToolingScriptPath(changedPath) ? [TOOLING_VITEST_CONFIG] : null;
28353006}
2836300728373008function shouldUseBroadChangedTargets(env = process.env) {
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。