Skip to content

Commit d15a783

Browse files
committed
fix(ci): run Bun smoke from trusted harness
1 parent 3c24a48 commit d15a783

3 files changed

Lines changed: 29 additions & 9 deletions

File tree

‎.github/workflows/install-smoke-reusable.yml‎

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1428,19 +1428,21 @@ jobs:
14281428
IMAGE_REF: ${{ needs.root_dockerfile_image.outputs.image_ref }}
14291429
run: docker image inspect "$IMAGE_REF" >/dev/null
14301430

1431-
- name: Setup Node environment for Bun smoke
1432-
uses: ./.release-harness/.github/actions/setup-node-env
1431+
- name: Setup trusted release harness for Bun smoke
1432+
uses: ./.release-harness/.github/actions/setup-release-harness
14331433
with:
1434-
cache-mode: restore
1435-
install-bun: "true"
1436-
install-deps: "true"
1434+
node-version: "24.x"
1435+
1436+
- name: Install Bun for global smoke
1437+
run: npm install -g [email protected]
14371438

14381439
- name: Run Bun global install image-provider smoke
1440+
working-directory: .release-harness
14391441
env:
14401442
OPENCLAW_BUN_GLOBAL_SMOKE_ALLOW_UNRELEASED_CHANGELOG: ${{ inputs.allow_unreleased_changelog }}
14411443
OPENCLAW_BUN_GLOBAL_SMOKE_DIST_IMAGE: ${{ needs.root_dockerfile_image.outputs.image_ref }}
14421444
OPENCLAW_BUN_GLOBAL_SMOKE_HOST_BUILD: "0"
1443-
run: bash .release-harness/scripts/e2e/bun-global-install-smoke.sh
1445+
run: bash scripts/e2e/bun-global-install-smoke.sh
14441446

14451447
docker-e2e-fast:
14461448
needs: [preflight]

‎test/scripts/install-smoke-no-push-workflow.test.ts‎

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ type WorkflowStep = {
1515
run?: string;
1616
uses?: string;
1717
with?: Record<string, unknown>;
18+
"working-directory"?: string;
1819
};
1920

2021
type WorkflowJob = {
@@ -504,6 +505,20 @@ describe("install smoke no-push root image transport", () => {
504505
OPENCLAW_INSTALL_SMOKE_GROUP: pair.group,
505506
});
506507
}
508+
509+
const bunConsumer = job(workflow, "bun_global_install_smoke");
510+
expect(step(bunConsumer, "Setup trusted release harness for Bun smoke")).toMatchObject({
511+
uses: "./.release-harness/.github/actions/setup-release-harness",
512+
with: { "node-version": "24.x" },
513+
});
514+
expect(step(bunConsumer, "Install Bun for global smoke").run).toBe("npm install -g [email protected]");
515+
expect(step(bunConsumer, "Run Bun global install image-provider smoke")).toMatchObject({
516+
"working-directory": ".release-harness",
517+
run: "bash scripts/e2e/bun-global-install-smoke.sh",
518+
});
519+
expect(JSON.stringify(bunConsumer)).not.toContain(
520+
"./.release-harness/.github/actions/setup-node-env",
521+
);
507522
});
508523

509524
it("packages candidate code only in an isolated image and verifies the sealed payload", () => {

‎test/scripts/test-install-sh-docker.test.ts‎

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2169,11 +2169,14 @@ chmod +x "$BUN_INSTALL/bin/openclaw"
21692169
"if: needs.preflight.outputs.run_full_install_smoke == 'true' && needs.preflight.outputs.run_bun_global_install_smoke == 'true'",
21702170
);
21712171
expect(workflow).toContain("bun_global_install_smoke:");
2172-
expect(workflow).toContain("Setup Node environment for Bun smoke");
2173-
expect(workflow).toContain('install-bun: "true"');
2172+
expect(workflow).toContain("Setup trusted release harness for Bun smoke");
2173+
expect(workflow).toContain("uses: ./.release-harness/.github/actions/setup-release-harness");
2174+
expect(workflow).toContain("npm install -g [email protected]");
21742175
expect(workflow).toContain('install-bun: "false"');
21752176
expect(workflow).toContain("Run Bun global install image-provider smoke");
2176-
expect(workflow).toContain("bash .release-harness/scripts/e2e/bun-global-install-smoke.sh");
2177+
expect(workflow).toContain("working-directory: .release-harness");
2178+
expect(workflow).toContain("bash scripts/e2e/bun-global-install-smoke.sh");
2179+
expect(workflow).not.toContain("uses: ./.release-harness/.github/actions/setup-node-env");
21772180
expect(workflow).toContain(
21782181
"OPENCLAW_BUN_GLOBAL_SMOKE_DIST_IMAGE: ${{ needs.root_dockerfile_image.outputs.image_ref }}",
21792182
);

0 commit comments

Comments
 (0)