Moab 用 LLM 将中位 CI 降至一分钟内
Moab 称,公司在八月的一个周末将代码库迁移至 monorepo,并把中位 CI 时间降至一分钟以内,同时显著增加了测试数量。其优化涵盖并行化、缓存、更快的运行器和删减无关步骤,LLM 则帮助发现了多项优化机会。改造前,其原有的 pytest 与 xdist GitHub Actions 配置运行三小时后仍超时。
该案例给出了在扩大代码与测试规模时维持快速 CI 的具体工程方法,并展示了 LLM 协助发现优化机会的实际用法。
Over a weekend in August, we migrated our entire codebase to a monorepo and brought its median CI time to under 1 minute.
We've held it there, while significantly increasing our test count.


Moab's product is an enterprise resource planning (ERP) system for equipment businesses. Our customers rely on it as their financial source of truth.
In the early days of Moab, fast CI was easy. With a small codebase using pytest and xdist on a GitHub Actions runner, CI can complete in under a minute. The hard part is keeping it fast while scaling. Moab now powers some very large businesses. Our codebase contains millions of lines of code, and the quantum of tests we had added to ensure correctness at scale considerably slowed down CI. In advance of publishing this post, we tried running our CI on GitHub Actions using our initial pytest and xdist setup. We'd like to tell you how long it took to complete, but the initial run timed out after 3 hours.
#Moab#Fable#AWS#Terraform#Python#Flask#SQLAlchemy#Postgres#React.js#TypeScript#GitHub Actions#pytest