chore(ci): cache typecheck work across runs - #4415
Conversation
|
WalkthroughThe 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
🧹 Nitpick comments (1)
.github/workflows/typecheck.yml (1)
26-38: 🎯 Functional Correctness | 🔵 Trivial | ⚡ Quick winInclude the toolchain version in the Turbo cache key.
The exact and fallback keys currently vary only by OS, lockfile, and commit. If Node or pnpm changes without a lockfile change, the prefix fallback can restore results created under the previous toolchain, allowing typecheck to be skipped incorrectly. Include the Node/pnpm versions in both
keyandrestore-keys; the pinned setup action exposes the installed Node version as an output. (turborepo.dev)Proposed key adjustment
- name: ⎔ Setup node + id: setup-node uses: WarpBuilds/setup-node@bc639b444d583175926b588962199c247d23e8d3 # v6 ... - key: turbo-typecheck-${{ runner.os }}-${{ hashFiles('pnpm-lock.yaml') }}-${{ github.sha }} + key: turbo-typecheck-${{ runner.os }}-${{ steps.setup-node.outputs.node-version }}-${{ hashFiles('pnpm-lock.yaml') }}-${{ github.sha }} restore-keys: | - turbo-typecheck-${{ runner.os }}-${{ hashFiles('pnpm-lock.yaml') }}- + turbo-typecheck-${{ runner.os }}-${{ steps.setup-node.outputs.node-version }}-${{ hashFiles('pnpm-lock.yaml') }}-Source: MCP tools
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Pro Plus
Run ID: 6dca08ea-eac4-4294-bfb4-a0fd64d4dbc7
📒 Files selected for processing (2)
.github/workflows/typecheck.ymlturbo.json
📜 Review details
⏰ Context from checks skipped due to timeout. (27)
- GitHub Check: e2e / 🧪 CLI v3 tests (warp-ubuntu-latest-x64-4x - npm)
- GitHub Check: webapp / 🧪 Unit Tests: Webapp (7, 12)
- GitHub Check: webapp / 🧪 Unit Tests: Webapp (10, 12)
- GitHub Check: webapp / 🧪 Unit Tests: Webapp (3, 12)
- GitHub Check: webapp / 🧪 Unit Tests: Webapp (1, 12)
- GitHub Check: webapp / 🧪 Unit Tests: Webapp (6, 12)
- GitHub Check: e2e / 🧪 CLI v3 tests (warp-ubuntu-latest-x64-4x - pnpm)
- GitHub Check: sdk-compat / Node.js 24.18 (warp-ubuntu-latest-x64-4x)
- GitHub Check: sdk-compat / Node.js 26.4 (warp-ubuntu-latest-x64-4x)
- GitHub Check: sdk-compat / Node.js 20.20 (warp-ubuntu-latest-x64-4x)
- GitHub Check: sdk-compat / Node.js 22.23 (warp-ubuntu-latest-x64-4x)
- GitHub Check: sdk-compat / Deno Runtime
- GitHub Check: sdk-compat / Cloudflare Workers
- GitHub Check: sdk-compat / Bun Runtime
- GitHub Check: packages / 🧪 Unit Tests: Packages (2, 3)
- GitHub Check: packages / 🧪 Unit Tests: Packages (1, 3)
- GitHub Check: packages / 🧪 Unit Tests: Packages (3, 3)
- GitHub Check: runops-guard / runops-guard
- GitHub Check: typecheck / typecheck
- GitHub Check: e2e-webapp / 🧪 E2E Tests: Webapp
- GitHub Check: audit
- GitHub Check: audit
- GitHub Check: code-quality / code-quality
- GitHub Check: Zizmor
- GitHub Check: Analyze (javascript-typescript)
- GitHub Check: Analyze (actions)
- GitHub Check: Build and publish previews
🔇 Additional comments (1)
turbo.json (1)
40-41: LGTM!
Summary
Persist Turbo typecheck results and use WarpBuild-backed pnpm caching on the typecheck runner. Warm benchmark runs reduced the job from 2m49s to 1m27s, with the cache continuing to hit after a new commit that did not affect task inputs.
Design
Generation remains uncached because the task does not declare restorable outputs. This ensures generated clients are always present while dependency builds, typechecking, and export checks can reuse Turbo’s content-addressed results.