Skip to content

chore(ci): cache typecheck work across runs - #4415

Merged
carderne merged 1 commit into
mainfrom
chore/ci-build
Jul 29, 2026
Merged

chore(ci): cache typecheck work across runs#4415
carderne merged 1 commit into
mainfrom
chore/ci-build

Conversation

@carderne

Copy link
Copy Markdown
Collaborator

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.

@changeset-bot

changeset-bot Bot commented Jul 29, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: a561ecf

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@coderabbitai

coderabbitai Bot commented Jul 29, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Walkthrough

The generate Turbo task is configured with caching disabled. The typecheck workflow now uses WarpBuilds/setup-node while retaining Node 24.18.0 and pnpm caching, and adds restoration of node_modules/.cache/turbo using OS, lockfile, and commit-based cache keys with a prefix fallback.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Description check ⚠️ Warning The description includes Summary and Design, but misses the required issue link, checklist, testing, changelog, and screenshots sections. Add the template sections: Closes #issue, checklist, testing steps, changelog, and screenshots, or mark non-applicable items clearly.
✅ Passed checks (4 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Title check ✅ Passed The title clearly states the main change: caching typecheck work across runs.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch chore/ci-build

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@devin-ai-integration devin-ai-integration Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Devin Review: No Issues Found

Devin Review analyzed this PR and found no bugs or issues to report.

Open in Devin Review

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick comments (1)
.github/workflows/typecheck.yml (1)

26-38: 🎯 Functional Correctness | 🔵 Trivial | ⚡ Quick win

Include 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 key and restore-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

📥 Commits

Reviewing files that changed from the base of the PR and between a11e5ff and a561ecf.

📒 Files selected for processing (2)
  • .github/workflows/typecheck.yml
  • turbo.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!

@carderne carderne changed the title perf(ci): cache typecheck work across runs chore(ci): cache typecheck work across runs Jul 29, 2026
@carderne
carderne merged commit 15e160d into main Jul 29, 2026
54 checks passed
@carderne
carderne deleted the chore/ci-build branch July 29, 2026 10:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants