Moab cuts monorepo CI median below one minute
Moab, which builds an ERP system for equipment businesses, published an engineering post describing how it moved its entire codebase into a monorepo over a weekend in August and brought median CI time under one minute, and says it has held that level while adding many more tests. The codebase is millions of lines of Python and TypeScript; when the team reran its original pytest and xdist setup on GitHub Actions for the post, the first run timed out after three hours. The gains come from four areas: parallelism (forking a pre-initialized app across vCPUs, assigning tests by past runtimes, splitting every check into its own job), caching (a persistent disk holding a git mirror, Docker images and a database snapshot), hardware (16 vCPU runners that start in 8–12 seconds), and elimination (lazy imports, skipping unaffected steps, faster tools like uv and ruff). One deliberate tradeoff: Moab always runs every unit test rather than predicting which tests a change affects, because it is the financial source of truth for customers. The post gives no before-and-after numbers for individual optimizations.
CI time tends to grow with the test suite: a small project finishes in under a minute, but as a codebase and its correctness tests scale, the same setup can take hours. Moab says most of its engineers now run many project threads at once, so pipeline latency directly limits how fast each one closes.
The reusable parts are the scheduling and caching choices: distribute tests across runners using measured runtimes from previous runs, hash-partition tests that have no timing data yet, keep a git mirror and Docker images on a persistent disk, and start from a database snapshot instead of rebuilding the schema. Teams adopting the disk-cache approach should note the commenters' warning that caches shared across untrusted code can be poisoned, and that a build manifest should record which hardware produced what.
One commenter questioned reporting the median, arguing a pipeline where 40% of runs take an hour would still look fine by that measure. Another described running roughly 75,000 pytest tests on an old local Xeon workstation because comparable cloud VMs are priced too high, and a third warned that CI caching is easy to get wrong when not all code triggering a run is trusted.