Tutorial
What Should CI Look Like in the Age of AI?
Continuous integration was designed for a team of people pushing a few commits a day. Every push ran every test, and a twenty minute wait was annoying but tolerable.
AI coding agents changed the math. One developer with a few agents can push dozens of commits a day. If every push runs a twenty minute suite, CI becomes the bottleneck. The agents sit idle waiting for it, and the CI bill grows with every one of them.
The answer is not to run fewer checks. It is to run the right checks at the right time, and to stop paying for tests and code that no longer earn their keep.
What this series covers
- Critical and important tests. Split the suite so the tests that protect money, data, and core journeys run on every push, and everything else runs daily.
- Faster static analysis. Get type checking and linting down to seconds, so agents can run them after every change.
- Find and purge bad tests. Remove tests that are slow, flaky, or never fail, because they cost time and teach nothing.
- Tombstone dead code. Find code your app no longer runs, prove it, and delete it along with its tests.
- Keep CI fast. Audit the tests your agents write on every pull request, so the long CI run never comes back.
- The same thing in PHPUnit. Every Pest example from the earlier pages, written for a suite that runs on PHPUnit.
Start with the first two pages. They are the changes that make the biggest difference to how long you wait.
Where this comes from
We run Scalpels this way. Our pull requests run a small critical suite plus static analysis, and the full suite runs every morning. Everything in this series is something we do ourselves.