// Case study
CI/CD build time cut from 45 minutes to 11
A Next.js monorepo marketplace shaved pipeline duration with Turborepo remote cache, Docker layer reuse, and parallelised Playwright shards.
A B2B marketplace team (~28 engineers) on a Next.js 14 monorepo with three apps and a shared UI package. Forty-five-minute main-branch builds drove hotfix CI skips and eroded release confidence.
45 → 11 min
Main pipeline duration
Median build time
38 → 8 min
PR check duration
p95 under 15-minute policy
2/week → daily
Deploy frequency
Post-optimisation cadence
4
Playwright e2e shards
Parallelised from single-threaded 18 min
Delivered by Deepak Pathak · Published April 16, 2025 · 9 min read
Client context
A B2B marketplace team, Next.js 14 monorepo, three apps, shared UI package, GitHub Actions on self-hosted runners, averaged 45-minute main-branch builds. Engineers skipped CI on hotfixes; release confidence dropped.
Delivery notes
Profiling showed: cold npm ci every job (12 min), redundant full TypeScript build across packages (9 min), single-threaded Playwright e2e (18 min), and Docker images rebuilt without layer cache (6 min).
Our approach
Interventions: Turborepo with Vercel remote cache for shared packages; affected-package detection on pull requests; docker buildx with registry-backed layer cache; Playwright split into four shards with merge-reporter; pnpm instead of npm for install speed.
The challenge
Problems: initial cache poisoning from a bad turbo artifact, fixed with cache key rotation and main-only publish; self-hosted runners disk exhaustion from dangling images, prune cron added; flaky e2e on payment sandbox timeout, isolated with test clock injection.
Technical implementation
Governance: main must stay green; PR required checks under 15 minutes p95; weekly pipeline cost review.
Results & impact
Outcome: main pipeline 45 min → 11 min median; PR checks 38 min → 8 min; deploy frequency 2/week → daily. Team size ~28 engineers, identity not disclosed.
// Related services
CIN
AAU-8582
Startup India
DIPP83124
Founded
November 2020
Office
Residency Rd, Bengaluru, India
Ready to scope your next initiative?
Share your goals with our Bangalore team. We respond within one business day with a clear path from discovery to delivery.
