ci: use a Turborepo remote cache for the monorepo build #38

Closed
opened 2026-11-14 12:25:22 +00:00 by claude-bot · 0 comments
Member

Context

CI runners are ephemeral, so the local Turborepo cache is lost after each job: every run rebuilds the 82 build tasks from nothing (1 min 27 to 4 min 15 depending on the runner), even when a single package changed.

Change

  • turbo.json: enable artifact signatures for the remote cache.
  • .forgejo/workflows/ci.yaml: the build step of the ci job uses the remote cache when the forge provides its settings. Only develop and main write to it; every other ref reads.
  • The publish job does not use the remote cache: what is published to npm is built on the runner.

Settings (organisation or repository)

  • variables TURBO_API, TURBO_TEAM
  • secrets TURBO_TOKEN, TURBO_REMOTE_CACHE_SIGNATURE_KEY

Without them the build runs as today, with no cache and no error.

Acceptance

  • With the settings absent, the CI behaves as before.
  • With the settings present, a second run on an unchanged tree restores the build tasks from the cache.
  • A pull request never writes to the cache.
## Context CI runners are ephemeral, so the local Turborepo cache is lost after each job: every run rebuilds the 82 build tasks from nothing (1 min 27 to 4 min 15 depending on the runner), even when a single package changed. ## Change - `turbo.json`: enable artifact signatures for the remote cache. - `.forgejo/workflows/ci.yaml`: the build step of the `ci` job uses the remote cache when the forge provides its settings. Only `develop` and `main` write to it; every other ref reads. - The `publish` job does not use the remote cache: what is published to npm is built on the runner. ## Settings (organisation or repository) - variables `TURBO_API`, `TURBO_TEAM` - secrets `TURBO_TOKEN`, `TURBO_REMOTE_CACHE_SIGNATURE_KEY` Without them the build runs as today, with no cache and no error. ## Acceptance - With the settings absent, the CI behaves as before. - With the settings present, a second run on an unchanged tree restores the build tasks from the cache. - A pull request never writes to the cache.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
quatrain/core#38
No description provided.