Selective Test Execution at Stripe: Fast CI for a 50M-line Ruby monorepo | Stripe Dot Dev Blog
24-Apr-2026 458
Stripe has an extremely large Ruby codebase: our monorepo is the order of 50 million lines of Ruby code, backed by a correspondingly huge test suite—roughly 100,000 Ruby test files and approximately 1.2 million test units. If we ran all of these tests sequentially end to end, a single build would take four months. Which is, of course, implausible.
To ensure builds finish within a reasonable time (a few minutes, not four months), we run them over a massively parallel set of workers. At our scale, we run around 50,000 builds a week, a number that is only increasing with AI adoption among our engineering teams accelerating commit rates and productivity.
Selective Test Execution (internally known as “STE”) is how we keep CI fast and affordable without giving up confidence. Simply put, we don’t run every test on every build. On average, we only run roughly 5% of our full Ruby test suite (with a median value of 0.5%) for a given build, spending <10% in compute of what an “always run everything” strategy would require. We are able to do this without sacrificing safety.
Selective Test Execution at Stripe: Fast CI for a 50M-line Ruby monorepo | Stripe Dot Dev Blog #ruby #rubydeveloper #rubyonrails #Selective #Execution #Stripe: #50M-line #monorepo #Stripe #blog #dev #stripe: #test https://www.rubyonrails.ba/link/selective-test-execution-at-stripe-fast-ci-for-a-50m-line-ruby-monorepo-stripe-dot-dev-blog