Turborepo vs Lerna: Which Monorepo Tool for CI?
They solve different halves of the monorepo problem: Turborepo caches and orchestrates tasks, Lerna versions and publishes packages.
Turborepo is a fast task runner with computation caching and affected-only runs for JS/TS monorepos. Lerna manages versioning and publishing of monorepo packages; modern Lerna delegates task running to Nx, and many teams pair Lerna (publishing) with Turborepo (task caching).
| Turborepo | Lerna | |
|---|---|---|
| Primary job | Task caching + orchestration | Versioning + publishing |
| Task/computation cache | Yes (local + remote) | Via Nx (modern Lerna) |
| Affected/only-changed runs | Yes | Yes (via Nx) |
| Publish workflow | No (external) | Yes (core feature) |
| Best for | Fast cached pipelines | Coordinated releases |
In CI
For build/test speed, Turborepo is the tool: cache task outputs and run only affected packages so unchanged code is not rebuilt. Lerna's enduring value is coordinated versioning and publishing of many packages. Because they overlap little, a common setup is Turborepo for caching/orchestration and Lerna for releases. If you only need fast CI tasks, Turborepo alone suffices.
Speed it up
Enable Turborepo's remote cache across CI jobs and scope tasks to affected packages - the single biggest speedup. Tasks that still run on a cache miss execute on CI runners; faster managed runners shorten those.
The verdict
Need fast cached builds and affected-only runs: Turborepo. Need coordinated versioning and publishing: Lerna. They are complementary - many monorepos use Turborepo for tasks and Lerna for releases.