Skip to content

Commit d98c90f

Browse files
author
Peter Steinberger
committed
ci: avoid full QA smoke package rebuild
1 parent 8de3c11 commit d98c90f

2 files changed

Lines changed: 22 additions & 8 deletions

File tree

‎.github/workflows/ci.yml‎

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1758,19 +1758,22 @@ jobs:
17581758

17591759
- name: Build QA smoke runtime
17601760
env:
1761-
OPENCLAW_BUILD_PRIVATE_QA: "1"
17621761
NODE_OPTIONS: --max-old-space-size=8192
17631762
run: |
1763+
# Pack the public runtime before overlaying private QA artifacts so they cannot leak.
1764+
unset OPENCLAW_BUILD_PRIVATE_QA
1765+
node scripts/build-all.mjs qaRuntime
1766+
pnpm ui:build
17641767
package_args=(
1768+
--skip-build
17651769
--output-dir .artifacts/qa-e2e/smoke-ci-package
17661770
--output-name openclaw-current.tgz
17671771
)
17681772
if grep -Fq -- '--allow-unreleased-changelog' scripts/package-openclaw-for-docker.mjs; then
17691773
package_args=(--allow-unreleased-changelog "${package_args[@]}")
17701774
fi
17711775
node scripts/package-openclaw-for-docker.mjs "${package_args[@]}"
1772-
node scripts/build-all.mjs qaRuntime
1773-
pnpm ui:build
1776+
OPENCLAW_BUILD_PRIVATE_QA=1 node scripts/build-all.mjs qaRuntime
17741777
17751778
- name: Run smoke profile part
17761779
env:

‎test/scripts/ci-workflow-guards.test.ts‎

Lines changed: 16 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5561,16 +5561,27 @@ printf '%s\n' "\${CURL_SUCCESS_IP:-203.0.113.7}"
55615561
expect(runStep.run).toContain("ci-routing)");
55625562
expect(fastCoreJob["runs-on"]).toContain("matrix.runner");
55635563
expect(smokeProfileJob.name).toBe("QA Smoke CI (${{ matrix.name }})");
5564+
const publicRuntimeBuild = smokeBuildStep.run.indexOf("node scripts/build-all.mjs qaRuntime");
5565+
const uiBuild = smokeBuildStep.run.indexOf("pnpm ui:build");
5566+
const packageBuild = smokeBuildStep.run.indexOf("node scripts/package-openclaw-for-docker.mjs");
5567+
const privateRuntimeBuild = smokeBuildStep.run.lastIndexOf(
5568+
"node scripts/build-all.mjs qaRuntime",
5569+
);
55645570
expect(smokeBuildStep.run).toContain("node scripts/build-all.mjs qaRuntime");
55655571
expect(smokeBuildStep.run).toContain("pnpm ui:build");
5566-
expect(smokeBuildStep.env.OPENCLAW_BUILD_PRIVATE_QA).toBe("1");
5567-
expect(smokeBuildStep.run).not.toContain("--skip-build");
5572+
expect(smokeBuildStep.env).not.toHaveProperty("OPENCLAW_BUILD_PRIVATE_QA");
5573+
expect(smokeBuildStep.run).toContain("unset OPENCLAW_BUILD_PRIVATE_QA");
5574+
expect(smokeBuildStep.run).toContain("--skip-build");
5575+
expect(smokeBuildStep.run).toContain(
5576+
"OPENCLAW_BUILD_PRIVATE_QA=1 node scripts/build-all.mjs qaRuntime",
5577+
);
5578+
expect(smokeBuildStep.run.match(/node scripts\/build-all\.mjs qaRuntime/g)).toHaveLength(2);
55685579
expect(smokeBuildStep.run).toContain("--allow-unreleased-changelog");
55695580
expect(smokeBuildStep.run).toContain("grep -Fq");
55705581
expect(smokeBuildStep.run).toContain('"${package_args[@]}"');
5571-
expect(smokeBuildStep.run.indexOf("node scripts/package-openclaw-for-docker.mjs")).toBeLessThan(
5572-
smokeBuildStep.run.indexOf("node scripts/build-all.mjs qaRuntime"),
5573-
);
5582+
expect(publicRuntimeBuild).toBeLessThan(uiBuild);
5583+
expect(uiBuild).toBeLessThan(packageBuild);
5584+
expect(packageBuild).toBeLessThan(privateRuntimeBuild);
55745585
expect(workflow.jobs["qa-smoke-ci-artifacts"]).toBeUndefined();
55755586
expect(workflow.jobs["qa-smoke-ci"]).toBeUndefined();
55765587
expect(smokeProfileJob.needs).toEqual(["preflight"]);

0 commit comments

Comments
 (0)