From bd997c686fa8edd7d3214aaf660a758338a0c514 Mon Sep 17 00:00:00 2001 From: Vincent Koc Date: Fri, 31 Jul 2026 03:32:08 -0700 Subject: [PATCH] fix(ci): reuse Testbox dependency snapshot --- .github/workflows/ci-check-testbox.yml | 5 ++++- test/scripts/package-acceptance-workflow.test.ts | 9 ++++++++- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci-check-testbox.yml b/.github/workflows/ci-check-testbox.yml index 79b70ef580d5..c70ba9d71f6e 100644 --- a/.github/workflows/ci-check-testbox.yml +++ b/.github/workflows/ci-check-testbox.yml @@ -24,7 +24,6 @@ concurrency: env: FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: "true" - PNPM_CONFIG_STORE_DIR: "/tmp/openclaw-pnpm-store" PNPM_CONFIG_VERIFY_DEPS_BEFORE_RUN: "false" jobs: @@ -99,6 +98,10 @@ jobs: with: install-bun: "false" install-trufflehog: "true" + # Real Testbox hydration reuses the protected dependency snapshot. + # Pull-request validation runs on GitHub-hosted runners instead. + sticky-disk: ${{ github.event_name == 'workflow_dispatch' && 'true' || 'false' }} + use-actions-cache: ${{ github.event_name == 'workflow_dispatch' && 'false' || 'true' }} - name: Prepare Testbox shell shell: bash run: | diff --git a/test/scripts/package-acceptance-workflow.test.ts b/test/scripts/package-acceptance-workflow.test.ts index 975fc8de821f..61ac3425c493 100644 --- a/test/scripts/package-acceptance-workflow.test.ts +++ b/test/scripts/package-acceptance-workflow.test.ts @@ -2383,6 +2383,7 @@ describe("package artifact reuse", () => { it("finalizes dispatched Testbox delegation even when setup or the remote command fails", () => { const workflow = readFileSync(CI_CHECK_TESTBOX_WORKFLOW, "utf8"); const checkTestboxJob = workflowJob(CI_CHECK_TESTBOX_WORKFLOW, "check"); + const setupNodeStep = workflowStep(checkTestboxJob, "Setup Node environment"); const runTestboxStep = workflowStep(checkTestboxJob, "Run Testbox"); const runArmTestboxStep = workflowStep( workflowJob(CI_CHECK_ARM_TESTBOX_WORKFLOW, "check-arm"), @@ -2397,9 +2398,15 @@ describe("package artifact reuse", () => { "Run Testbox", ); - expect(workflow).toContain('PNPM_CONFIG_STORE_DIR: "/tmp/openclaw-pnpm-store"'); + expect(workflow).not.toContain('PNPM_CONFIG_STORE_DIR: "/tmp/openclaw-pnpm-store"'); expect(workflow).not.toContain("PNPM_CONFIG_MODULES_DIR"); expect(workflow).not.toContain("PNPM_CONFIG_VIRTUAL_STORE_DIR"); + expect(setupNodeStep.with["sticky-disk"]).toBe( + "${{ github.event_name == 'workflow_dispatch' && 'true' || 'false' }}", + ); + expect(setupNodeStep.with["use-actions-cache"]).toBe( + "${{ github.event_name == 'workflow_dispatch' && 'false' || 'true' }}", + ); expect(checkTestboxJob["timeout-minutes"]).toBe( "${{ fromJSON(inputs.timeout_minutes || '120') }}", );