From e6097b97a78288a6239a60af3106cf922fdd92a9 Mon Sep 17 00:00:00 2001 From: Paul Golmann Date: Wed, 30 Sep 2026 23:43:29 +0200 Subject: [PATCH] ci: restore each job's turbo cache before the build cache actions/cache stops at the first matching restore prefix, so a leading build- key made lint, typecheck, and test always reuse the build cache and never their own saved task hashes. --- .github/actions/setup/action.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/actions/setup/action.yml b/.github/actions/setup/action.yml index 3476977b..e7ccca93 100644 --- a/.github/actions/setup/action.yml +++ b/.github/actions/setup/action.yml @@ -38,11 +38,13 @@ runs: uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0 with: # Unique primary key (job+sha) so each job can save; caches are immutable. - # Prefer restoring build's .turbo so sparse jobs don't poison consecutive runs. + # Restore this job's previous cache first. actions/cache stops at the + # first prefix match, so a leading build- key would hide lint/typecheck/test + # caches. build- is the fallback until a job has saved its own. key: ${{ runner.os }}-turbo-${{ hashFiles('**/turbo.json', '**/pnpm-lock.yaml') }}-${{ github.job }}-${{ github.sha }} restore-keys: | - ${{ runner.os }}-turbo-${{ hashFiles('**/turbo.json', '**/pnpm-lock.yaml') }}-build- ${{ runner.os }}-turbo-${{ hashFiles('**/turbo.json', '**/pnpm-lock.yaml') }}-${{ github.job }}- + ${{ runner.os }}-turbo-${{ hashFiles('**/turbo.json', '**/pnpm-lock.yaml') }}-build- ${{ runner.os }}-turbo-${{ hashFiles('**/turbo.json', '**/pnpm-lock.yaml') }}- ${{ runner.os }}-turbo- path: .turbo