diff --git a/.github/workflows/studio-e2e-test.yml b/.github/workflows/studio-e2e-test.yml index 4fbf78462d8..e67d6816066 100644 --- a/.github/workflows/studio-e2e-test.yml +++ b/.github/workflows/studio-e2e-test.yml @@ -20,6 +20,12 @@ jobs: env: OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }} + # Per-PR Turbopack cache key (falls back to per-branch on push) + TURBOPACK_CACHE_KEY: ${{ + github.event_name == 'pull_request' && + format('{0}-pr-{1}-turbopack-cache', github.repository, github.event.pull_request.number) || + format('{0}-branch-{1}-turbopack-cache', github.repository, github.ref_name) + }} steps: - uses: actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955 # v4.3.0 @@ -36,6 +42,16 @@ jobs: - 'e2e/studio/**' - 'pnpm-lock.yaml' - '.github/workflows/studio-e2e-test.yml' + + # ⬇️ Mount Turbopack cache on a Sticky Disk (per PR) + - name: Mount Turbopack cache (Sticky Disk) + if: steps.filter.outputs.studio == 'true' + uses: useblacksmith/stickydisk@v1 + with: + key: ${{ env.TURBOPACK_CACHE_KEY }} + # adjust if your Next app lives elsewhere + path: apps/studio/.next/cache + - uses: pnpm/action-setup@41ff72655975bd51cab0327fa583b6e92b6d3061 # v4.2.0 if: steps.filter.outputs.studio == 'true' name: Install pnpm