ci: limit bun install smoke to release gates

This commit is contained in:
Peter Steinberger
2026-04-24 01:22:39 +01:00
parent 3a2f0e7a1a
commit d1ea58fdbf
4 changed files with 68 additions and 6 deletions

View File

@@ -5,6 +5,7 @@ const SCRIPT_PATH = "scripts/test-install-sh-docker.sh";
const SMOKE_RUNNER_PATH = "scripts/docker/install-sh-smoke/run.sh";
const BUN_GLOBAL_SMOKE_PATH = "scripts/e2e/bun-global-install-smoke.sh";
const INSTALL_SMOKE_WORKFLOW_PATH = ".github/workflows/install-smoke.yml";
const RELEASE_CHECKS_WORKFLOW_PATH = ".github/workflows/openclaw-release-checks.yml";
describe("test-install-sh-docker", () => {
it("defaults local Apple Silicon smoke runs to native arm64 while keeping CI on amd64", () => {
@@ -138,10 +139,16 @@ describe("bun global install smoke", () => {
expect(script).toContain("OPENCLAW_BUN_GLOBAL_SMOKE_DIST_IMAGE");
});
it("runs from the install-smoke workflow with Bun enabled", () => {
it("gates workflow Bun install smoke to scheduled and release-check runs", () => {
const workflow = readFileSync(INSTALL_SMOKE_WORKFLOW_PATH, "utf8");
const releaseChecks = readFileSync(RELEASE_CHECKS_WORKFLOW_PATH, "utf8");
expect(workflow).toContain("workflow_call:");
expect(workflow).toContain("run_bun_global_install_smoke:");
expect(workflow).toContain('install-bun: "true"');
expect(workflow).toContain(
"if: needs.preflight.outputs.run_bun_global_install_smoke == 'true'",
);
expect(workflow).toContain("Run Bun global install image-provider smoke");
expect(workflow).toContain("bash scripts/e2e/bun-global-install-smoke.sh");
expect(workflow).toContain(
@@ -149,10 +156,16 @@ describe("bun global install smoke", () => {
);
expect(workflow).toContain("format('{0}-manual-{1}', github.workflow, github.run_id)");
expect(workflow).toContain("OPENCLAW_CI_FORCE_FULL_INSTALL_SMOKE");
expect(workflow).toContain("OPENCLAW_CI_WORKFLOW_BUN_GLOBAL_INSTALL_SMOKE");
expect(workflow).toContain('if [ "$event_name" = "schedule" ]; then');
expect(workflow).toContain('echo "run_bun_global_install_smoke=$run_bun_global_install_smoke"');
expect(workflow).toContain('if [ "$force_full_install_smoke" = "true" ]; then');
expect(workflow).toContain("install-smoke-fast:");
expect(workflow).toContain("run_fast_install_smoke");
expect(workflow).toContain("run_full_install_smoke");
expect(workflow).toContain('OPENCLAW_INSTALL_SMOKE_SKIP_NPM_GLOBAL: "1"');
expect(releaseChecks).toContain("install_smoke_release_checks:");
expect(releaseChecks).toContain("uses: ./.github/workflows/install-smoke.yml");
expect(releaseChecks).toContain("run_bun_global_install_smoke: true");
});
});