Skip to content

Commit 4f6cd69

Browse files
committed
ci: persist Turbo cache across CI runs
Add an actions/cache@v4 step after pnpm install to save and restore .turbo/cache between runs. Cache key is sha-scoped so each run saves a fresh entry; restore-keys falls back to the most recent same-OS entry. Benefits check-types (~110 packages); lint and test don't go through Turbo. Follow-ups: extend to docker.yml; adopt Vercel Remote Cache or route root lint/test through turbo for broader wins.
1 parent a44fff2 commit 4f6cd69

1 file changed

Lines changed: 10 additions & 0 deletions

File tree

.github/workflows/ci.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,16 @@ jobs:
3535

3636
- run: pnpm install --frozen-lockfile
3737

38+
# Cache benefits check-types only (lint/test don't run through turbo);
39+
# revisit if root scripts move under turbo.
40+
- name: Restore Turbo cache
41+
uses: actions/cache@v4
42+
with:
43+
path: .turbo/cache
44+
key: turbo-${{ runner.os }}-${{ github.sha }}
45+
restore-keys: |
46+
turbo-${{ runner.os }}-
47+
3848
- name: Lint commit messages (PR only)
3949
if: github.event_name == 'pull_request'
4050
run: pnpm exec commitlint --from "${BASE_SHA}" --to "${HEAD_SHA}" --verbose

0 commit comments

Comments
 (0)