8000 ci: cache turbo tasks with actions/cache and run jobs in parallel by hipstersmoothie · Pull Request #1427 · jimp-dev/jimp · GitHub
[go: up one dir, main page]

Skip to content

ci: cache turbo tasks with actions/cache and run jobs in parallel - #1427

Merged
hipstersmoothie merged 1 commit into
mainfrom
sesh/optimize-ci-with-github-actions
Nov 22, 2026
Merged

hipstersmoothie merged 1 commit into
mainfrom
sesh/optimize-ci-with-github-actions

Conversation

@hipstersmoothie
Copy link
Copy Markdown
Collaborator

What

  • Replaces the per-run dist cache (.github/actions/build-cache) with turbo's local cache persisted through actions/cache@v4 (.github/actions/turbo-cache), following the Turborepo GitHub Actions guide. The cache key is the job name plus the commit, and each run restores the newest entry for that job, so packages that haven't changed reuse earlier build, lint and test results.
  • lint, test and test-browser now depend on install instead of build, so they run in parallel with the build job. Each job's turbo cache restores the dist of the packages its tasks depend on (^build), and lint is plain eslint . with no type info.
  • deploy.yml's build job uses the cache too. It shares the build key with the build job in build.yml.
  • The no-op install job stays because it's a required status check.

Local results

  • pnpm build: 16.3s cold, then 0.5s fully cached (36/36 tasks), with dist restored after deleting it.
  • One plugin's tests run twice: 5.1s cold, then 0.18s fully cached.

Notes

  • The first run on any job will be slow because its cache starts empty. Rerunning CI on this PR will show the cached times.
  • Installing Playwright's Chromium isn't cached yet and could be a follow-up.

🤖 Generated with Claude Code

Replace the per-run dist cache with turbo's local cache persisted via
actions/cache, keyed per job. Unchanged packages now replay build, lint
and test results across runs instead of rebuilding.

Since each job's turbo cache replays its own ^build dependencies, lint,
test and test-browser no longer need to wait on the build job.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@hipstersmoothie
hipstersmoothie merged commit a7bf48a into main Nov 22, 2026
5 checks passed
@hipstersmoothie
hipstersmoothie deleted the sesh/optimize-ci-with-github-actions branch November 22, 2026 07:42
hipstersmoothie added a commit that referenced this pull request Nov 22, 2026
… (#1441)

build:browser didn't depend on its own package's build, so tshy could
write its dist/browser/index.js stub after rollup had written the real
bundle. Its outputs were also set to browser.js, which rollup doesn't
write, so a turbo cache hit restored nothing and left tshy's stub in
place. With the turbo cache now restored in CI (#1427), a cached rebuild
produced the stub every time.

- build:browser now depends on build and caches dist/browser/**
- pnpm build (and so CI, deploy and release) runs a check that fails if
  packages/jimp/dist/browser/index.js is the stub or doesn't export Jimp

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
@hipstersmoothie
Copy link
Copy Markdown
Collaborator Author

🚀 PR was released in v2.0.0 🚀

@hipstersmoothie hipstersmoothie added the released This issue/pull request has been released. label Nov 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

released This issue/pull request has been released.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

0