From 4781167a10c3f957157a14a4c207b0a39057bf52 Mon Sep 17 00:00:00 2001 From: Brian Strauch Date: Tue, 23 Jun 2026 11:31:43 -0700 Subject: [PATCH] ci: pre-download time-skipping test server before test loop The time-skipping test server binary is fetched lazily on first use and cached in the system temp dir. Previously the cold download happened inside whichever sample first called TestWorkflowEnvironment.createTimeSkipping() (eager-workflow-start), racing Jest's default 5000ms beforeAll timeout and flaking on slower runners (e.g. windows-latest). Trigger the download once in a dedicated step after install and before the sample loop, so every sample hits the cached binary and the download is no longer on the critical path of any timed test hook. Co-Authored-By: Claude Opus 4.8 (1M context) --- .github/workflows/ci.yml | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 81ae6231..d4cbc8ff 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -49,6 +49,16 @@ jobs: - run: pnpm install + # Download the time-skipping test server once, before the test loop. The + # binary is fetched lazily on first use and cached in the system temp dir; + # doing it here keeps the cold download off the critical path of any test's + # default 5s hook timeout (which flakes on slower runners). + - name: Pre-download time-skipping test server + shell: bash + working-directory: eager-workflow-start + run: > + node -e "require('@temporalio/testing').TestWorkflowEnvironment.createTimeSkipping().then(e => e.teardown())" + - name: Build and test sample projects shell: bash run: |