Skip to content

internal: Trim CI workspaces to only what each job needs#3793

Merged
ntucker merged 4 commits intomasterfrom
ci-trim-workspaces
Mar 20, 2026
Merged

internal: Trim CI workspaces to only what each job needs#3793
ntucker merged 4 commits intomasterfrom
ci-trim-workspaces

Conversation

@ntucker
Copy link
Copy Markdown
Collaborator

@ntucker ntucker commented Mar 19, 2026

Motivation

Every GitHub Actions workflow was installing the full monorepo workspace — including heavy deps like playwright, @tanstack/react-query, swr, and webpack from examples/benchmark-react — even in jobs that never use them (releases, bundle size, node benchmarks).

Solution

Each workflow now explicitly sets the exact workspaces it needs before yarn install:

Workflow Workspaces
benchmark.yml packages/*, examples/benchmark, scripts/rollup-plugins
benchmark-react.yml packages/*, examples/benchmark-react, scripts/rollup-plugins
bundle_size.yml packages/*, examples/test-bundlesize, scripts/rollup-plugins
release.yml packages/*, scripts/rollup-plugins
beta-release.yml packages/*, scripts/rollup-plugins

scripts/rollup-plugins is required everywhere since all packages declare it as a workspace:* devDep.

Uses an explicit set rather than filter so new workspaces added to root package.json won't accidentally leak into CI.

Also: CircleCI setup updated to exclude the website workspace, and AGENTS.md updated with a note about keeping CI in sync with workspace changes.

Open questions

N/A

Made with Cursor


Note

Medium Risk
Moderate risk because it changes dependency installation behavior across multiple CI workflows; mis-scoped workspaces could cause CI failures or missing build-time deps, but it doesn’t affect runtime product code.

Overview
CI now installs only the yarn workspaces needed per job instead of the full monorepo, reducing install time and avoiding heavy example dependencies in unrelated workflows.

This introduces scripts/ci-install.sh, which temporarily rewrites root package.json workspaces (always including packages/* and scripts/rollup-plugins, plus optional job-specific examples), runs yarn install, then restores package.json/yarn.lock.

GitHub Actions workflows for benchmarks, bundle-size, and releases switch to this script, bundle-size also explicitly disables immutable installs for the size action, and CircleCI’s workspace pruning is updated (plus a note in AGENTS.md to keep CI in sync with workspace changes).

Written by Cursor Bugbot for commit 8e0d415. This will update automatically on new commits. Configure here.

Each GitHub Actions workflow now sets exactly the workspaces it requires
instead of installing everything. This avoids pulling in heavy deps like
playwright, @tanstack/react-query, swr, and webpack in jobs that never
use them.

CircleCI setup also updated to exclude the website workspace.

Made-with: Cursor
@vercel
Copy link
Copy Markdown

vercel bot commented Mar 19, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Actions Updated (UTC)
docs-site Ignored Ignored Preview Mar 19, 2026 11:56pm

@changeset-bot
Copy link
Copy Markdown

changeset-bot bot commented Mar 19, 2026

⚠️ No Changeset found

Latest commit: 8e0d415

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

@codecov
Copy link
Copy Markdown

codecov bot commented Mar 19, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 98.06%. Comparing base (1f34136) to head (8e0d415).
⚠️ Report is 1 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #3793   +/-   ##
=======================================
  Coverage   98.06%   98.06%           
=======================================
  Files         151      151           
  Lines        2843     2843           
  Branches      556      556           
=======================================
  Hits         2788     2788           
  Misses         11       11           
  Partials       44       44           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Copy link
Copy Markdown

@cursor cursor bot left a comment

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

ntucker added 3 commits March 19, 2026 19:40
Yarn 4 auto-enables immutable installs in GitHub Actions (and hardened
mode on public PRs), so modifying workspaces before install requires
explicitly opting out.

Made-with: Cursor
The workspace-trimming one-liner left package.json and yarn.lock dirty,
causing changesets to commit them and github-action-benchmark to fail on
git switch. Centralize trim-install-restore into a single script so the
tree is always clean before downstream actions run.

Made-with: Cursor
@github-actions
Copy link
Copy Markdown
Contributor

Size Change: 0 B

Total Size: 80.5 kB

ℹ️ View Unchanged
Filename Size
examples/test-bundlesize/dist/App.js 3.18 kB
examples/test-bundlesize/dist/polyfill.js 307 B
examples/test-bundlesize/dist/rdcClient.js 10.2 kB
examples/test-bundlesize/dist/rdcEndpoint.js 6.35 kB
examples/test-bundlesize/dist/react.js 59.7 kB
examples/test-bundlesize/dist/webpack-runtime.js 726 B

compressed-size-action

Copy link
Copy Markdown
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

Benchmark

Details
Benchmark suite Current: 8e0d415 Previous: 1f34136 Ratio
normalizeLong 444 ops/sec (±1.09%) 443 ops/sec (±1.29%) 1.00
normalizeLong Values 412 ops/sec (±0.62%) 408 ops/sec (±0.20%) 0.99
denormalizeLong 292 ops/sec (±2.70%) 289 ops/sec (±2.55%) 0.99
denormalizeLong Values 265 ops/sec (±2.75%) 259 ops/sec (±2.31%) 0.98
denormalizeLong donotcache 1051 ops/sec (±0.18%) 1046 ops/sec (±0.49%) 1.00
denormalizeLong Values donotcache 779 ops/sec (±0.17%) 780 ops/sec (±0.30%) 1.00
denormalizeShort donotcache 500x 1585 ops/sec (±0.13%) 1582 ops/sec (±0.13%) 1.00
denormalizeShort 500x 864 ops/sec (±2.16%) 858 ops/sec (±2.33%) 0.99
denormalizeShort 500x withCache 6616 ops/sec (±0.21%) 6698 ops/sec (±0.28%) 1.01
queryShort 500x withCache 2768 ops/sec (±0.10%) 2777 ops/sec (±0.12%) 1.00
buildQueryKey All 53440 ops/sec (±0.38%) 55315 ops/sec (±0.34%) 1.04
query All withCache 6769 ops/sec (±0.40%) 6782 ops/sec (±0.18%) 1.00
denormalizeLong with mixin Entity 285 ops/sec (±2.35%) 275 ops/sec (±2.15%) 0.96
denormalizeLong withCache 6592 ops/sec (±0.15%) 6881 ops/sec (±0.24%) 1.04
denormalizeLong Values withCache 5093 ops/sec (±0.12%) 5168 ops/sec (±0.53%) 1.01
denormalizeLong All withCache 6507 ops/sec (±0.11%) 6534 ops/sec (±0.18%) 1.00
denormalizeLong Query-sorted withCache 6767 ops/sec (±0.16%) 6820 ops/sec (±0.13%) 1.01
denormalizeLongAndShort withEntityCacheOnly 1737 ops/sec (±0.18%) 1714 ops/sec (±0.19%) 0.99
getResponse 4694 ops/sec (±0.75%) 4820 ops/sec (±0.69%) 1.03
getResponse (null) 10243284 ops/sec (±1.12%) 10295613 ops/sec (±1.66%) 1.01
getResponse (clear cache) 274 ops/sec (±2.18%) 270 ops/sec (±2.06%) 0.99
getSmallResponse 3437 ops/sec (±0.13%) 3320 ops/sec (±0.21%) 0.97
getSmallInferredResponse 2567 ops/sec (±0.48%) 2538 ops/sec (±0.08%) 0.99
getResponse Collection 4648 ops/sec (±0.63%) 4702 ops/sec (±0.40%) 1.01
get Collection 4569 ops/sec (±0.44%) 4682 ops/sec (±0.19%) 1.02
get Query-sorted 5253 ops/sec (±0.25%) 5363 ops/sec (±0.69%) 1.02
setLong 451 ops/sec (±0.18%) 454 ops/sec (±0.28%) 1.01
setLongWithMerge 256 ops/sec (±0.64%) 257 ops/sec (±0.19%) 1.00
setLongWithSimpleMerge 276 ops/sec (±0.19%) 273 ops/sec (±0.14%) 0.99
setSmallResponse 500x 956 ops/sec (±0.14%) 949 ops/sec (±0.07%) 0.99

This comment was automatically generated by workflow using github-action-benchmark.

@ntucker ntucker merged commit 3d7a577 into master Mar 20, 2026
25 checks passed
@ntucker ntucker deleted the ci-trim-workspaces branch March 20, 2026 00:04
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.

1 participant