Moab migrated its entire codebase to a monorepo over a weekend in August and brought median CI time below one minute. The company says it has kept CI under that mark while significantly increasing its test count.
Moab makes an enterprise resource planning (ERP) system for equipment businesses, whose customers rely on it as their financial source of truth. The company says its codebase now contains millions of lines of code. In a test before publishing the post, its original setup—pytest and xdist on GitHub Actions—timed out after three hours.
The company says faster CI shortens the iteration loop, particularly for its agents. Most engineers are now juggling tens of project threads, and CI can be a bottleneck in closing each one. Moab says quicker runs help it respond to customer requests, fix bugs and ship the broad range of capabilities required for an ERP.
Moab also sees CI time as an internal measure of technical understanding and team alignment. Reducing it requires knowledge of every layer of the stack, the company says, while keeping it low depends on engineers avoiding unusually slow tests. Moab considers CI time one of the best proxies for engineering culture.
Its stack includes AWS, Terraform, Python, Flask, SQLAlchemy, Postgres, and React.js with TypeScript. Moab says it achieved subminute CI by addressing wasted time at every layer, with changes focused on parallelism, caching, hardware and elimination. Inspired by Boris Cherny's claimed use of Fable to reduce CI time, the team used LLMs to identify optimization opportunities.
Parallelism, Moab says, has been especially important for keeping CI time flat as the test count grows. The team initializes and freezes its app, then forks it to match the number of available vCPUs in the runner pool.
Unit tests are distributed across runners using execution-time data from previous runs. Within each runner, processes receive tests according to the Longest Processing Time heuristic. Tests without timing data are spread deterministically across runners through hash partitioning.
The team also runs each check as a separate job and avoids sequencing jobs in the critical path when it is not required.
For caching, Moab attaches a storage volume to test runners so data persists between executions, reducing repeated computation and network requests. A Git mirror of the application code on the disk avoids a full GitHub checkout; each run needs only a shallow fetch.
Docker images are stored on the disk to reduce build time, with a job baking new images as needed. Docker restarts with its entire data root directory on the disk. Moab warms the disk by reading Docker images and application source code, so later reads can use loaded pages.
A snapshot of the development database is stored in Amazon S3. Using it avoids DDL operations to construct the schema and cuts time spent loading fixtures. Migrations are applied to the snapshot when a PR contains them.
Moab uses a vendor for fast runners. The company says the wait between a code push and runner startup can add significant CI time. Most jobs use 16 vCPU Ubuntu x64 runners, which start within 8 to 12 seconds. In its testing, two 16 vCPU machines started faster than one 32 vCPU machine.
The team says it pursues small time savings by examining abstractions and complexity, and removing what it does not need. Its measures include lazy imports to avoid loading the whole application up front and skipping garbage collection where possible, including during the initial application import.
Moab skips actions unaffected by the changes: database migrations do not run for PRs without schema changes, and Semgrep scans diffs rather than the entire codebase. It has replaced slower tools with uv, ruff, ty, bun check, oxlint and oxfmt, and moved from xdist to native forking.
The pipeline reports results before the runner exits, keeping cleanup out of the critical path, and polls for completed jobs instead of using the GitHub API for dependencies. Telemetry and pytest extensions are disabled during the run; Pydantic model compilation and Flask route building are deferred until needed. FactoryBoy database fixtures persist with a flush instead of a commit, and migrations have been squashed.
Moab deliberately chose not to predict which unit tests are in scope based on PR changes. It runs every unit test, saying that as its customers' source of truth, the speed gain was not worth the tradeoff.
The post thanks Pavel Asparouhov, Shreyan Jain, Yunyu Lin, Jiajun Xu, and Jason Katzer for reading drafts.

