ci: Shorten CircleCI setup, report coverage sooner, speed up the website check - #4201
Conversation
…the website check - setup no longer copies the yarn cache into the workspace; only jobs that re-resolve dependencies restore it. The cache key now hashes the committed manifests, so it hits exactly instead of always falling back. - codecov reports as soon as coverage is processed instead of waiting for every CI job. - The website check builds the site directly with a cached webpack build, builds only the packages it imports, and fails on build warnings. Broken links now log as warnings. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0174ShyuST1krJS2ZqzuLi9B
|
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #4201 +/- ##
=======================================
Coverage 98.09% 98.09%
=======================================
Files 165 165
Lines 3145 3145
Branches 626 626
=======================================
Hits 3085 3085
Misses 18 18
Partials 42 42 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
- Downstream jobs restore the dependency cache by the same key setup saved (carried in the workspace) instead of whichever entry is newest. The cache no longer holds install-state.gz, so restoring after attach_workspace is safe. - The website typecheck and build share one job and one install; ci:build:website builds types and the packages the site imports in parallel. - The webpack cache key drops head_ref: caches are already scoped per PR. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0174ShyuST1krJS2ZqzuLi9B
|
Staff engineer (Cursor agent): LGTM at c862947. No changes requested for this PR. What I checked:
FOLLOW_UP (optional, after merge): caches are scoped to each PR, and nothing on master saves |
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0174ShyuST1krJS2ZqzuLi9B
Requested by Nathaniel · project thread
Motivation
I timed the latest pushes on #4184, #4148, #4181 and #4192. PR CI takes 3–4 min, and CircleCI is the critical path. Its
setupjob takes about 1m40s, and 55s of that is just uploading a 334 MiB workspace. Codecov holds its status for another 30–50s after coverage is uploaded, until every CircleCI job finishes. The website check takes 2m37s cold, every time: it installs the Vercel CLI, runs a full uncached install, builds every package, and runs a Docusaurus build with no cache.Solution
.yarn/cache(~130 MiB). Only jobs that runyarn up/add(unit_testsother thanlatest,node_matrix,esmodule-types) restore it, by prefix, beforeattach_workspace.yarn uprewroteyarn.lockand the examplepackage.jsonfiles between restore and save, so every run fell back to whichever cache was newest. The key now hashes the manifests as committed (git show HEAD:…).require_ci_to_pass: falseandwait_for_ci: false, so coverage reports as soon as it's processed.buildjob:yarn workspace rdc-website buildandVERCEL_ENV=preview, so drafts are included like the preview deploy.ci-install.sh website, and builds only the packages the site imports.[WARNING]/[ERROR]line.onBrokenLinks/onBrokenMarkdownLinksgo fromlogtowarn, so broken links fail this check but never fail a Vercel deploy. Master currently builds with no warnings. I checked that an injected broken link fails the check.Open questions
The workspace saving is an estimate, and this PR's own CircleCI run will measure it.
🤖 Generated with Claude Code
https://claude.ai/code/session_0174ShyuST1krJS2ZqzuLi9B
Generated by Claude Code
Note
Low Risk
CI and docs tooling only; no runtime app logic, though stricter website build warnings may surface new PR failures.
Overview
Speeds up CircleCI, Codecov, and the docs site CI by shrinking workspace uploads, fixing yarn cache keys, and replacing the Vercel-based website job with a cached local Docusaurus build.
CircleCI stops persisting
.yarn/cachein the setup workspace (~130 MiB) and addsrestore-yarn-cachefor jobs that runyarn up/add(React matrix exceptlatest,node_matrix,esmodule-types). Dependency cache keys move tov16-dependencies-{{ checksum ".ci-deps-key" }}, where.ci-deps-keyhashes manifests fromgit show HEAD:…before trimming/yarn uprewrites them, so restore/save actually match.codecov.ymlsetsrequire_ci_to_pass: falseandnotify.wait_for_ci: falseso coverage status posts without waiting for all Circle jobs.site-preview.ymlcollapses to a singlebuildjob:ci-install.sh website, newyarn ci:build:website, typecheck, restore/save Docusaurus webpack cache (save only on master push), thenyarn workspace rdc-website buildwithVERCEL_ENV=previewinstead of Vercel CLI. The job fails on[WARNING]/[ERROR]in the build log.docusaurus.config.tschanges broken link handling fromlogtowarnso this check catches issues without breaking Vercel deploys.Reviewed by Cursor Bugbot for commit fb19069. Bugbot is set up for automated code reviews on this repo. Configure here.