fix(ci): gate plugin prerelease docker suite

This commit is contained in:
Vincent Koc
2026-04-29 01:04:23 -07:00
parent 115e763804
commit b85cf280c7
4 changed files with 32 additions and 7 deletions

View File

@@ -129,6 +129,9 @@ describe("scripts/lib/plugin-prerelease-test-plan.mjs", () => {
const pluginManifestScript = pluginPreflight.steps.find(
(step) => step.name === "Build plugin prerelease manifest",
).run;
const pluginManifestEnv = pluginPreflight.steps.find(
(step) => step.name === "Build plugin prerelease manifest",
).env;
const normalCiScript = releaseWorkflow.jobs.normal_ci.steps.find(
(step) => step.name === "Dispatch and monitor CI",
).run;
@@ -163,7 +166,7 @@ describe("scripts/lib/plugin-prerelease-test-plan.mjs", () => {
);
expect(normalCiScript).not.toContain("full_release_validation=true");
expect(pluginPrereleaseScript).toContain(
'dispatch_and_wait plugin-prerelease.yml -f target_ref="$TARGET_SHA" -f expected_sha="$TARGET_SHA"',
'dispatch_and_wait plugin-prerelease.yml -f target_ref="$TARGET_SHA" -f expected_sha="$TARGET_SHA" -f full_release_validation=true',
);
expect(pluginManifestScript).toContain("await import(");
expect(pluginManifestScript).toContain('"./scripts/lib/plugin-prerelease-test-plan.mjs"');
@@ -177,6 +180,19 @@ describe("scripts/lib/plugin-prerelease-test-plan.mjs", () => {
default: "main",
type: "string",
});
expect(pluginWorkflow.on.workflow_dispatch.inputs.full_release_validation).toMatchObject({
default: false,
type: "boolean",
});
expect(pluginManifestEnv).toMatchObject({
FULL_RELEASE_VALIDATION: "${{ inputs.full_release_validation && 'true' || 'false' }}",
});
expect(pluginManifestScript).toContain(
'const fullReleaseValidation = process.env.FULL_RELEASE_VALIDATION === "true";',
);
expect(pluginManifestScript).toContain(
"const runDocker = fullReleaseValidation && dockerLanes.length > 0;",
);
expect(pluginPreflight.outputs).toMatchObject({
checkout_revision: "${{ steps.manifest.outputs.checkout_revision }}",
plugin_prerelease_docker_lanes:
@@ -209,7 +225,7 @@ describe("scripts/lib/plugin-prerelease-test-plan.mjs", () => {
staticShard.steps.find((step) => step.name === "Run plugin prerelease static shard").run,
).toContain('bash -c "$PLUGIN_PRERELEASE_COMMAND"');
expect(dockerSuite).toMatchObject({
if: "needs.preflight.outputs.run_plugin_prerelease_docker == 'true'",
if: "${{ inputs.full_release_validation && needs.preflight.outputs.run_plugin_prerelease_docker == 'true' }}",
needs: ["preflight"],
uses: "./.github/workflows/openclaw-live-and-e2e-checks-reusable.yml",
with: {