Almost every software engineer has experienced the frustration of debugging integration tests through repeated CI runs. The test fails in CI, and every attempted fix requires another commit, another push, and another wait for feedback. The root cause is often simple: the integration test cannot be reproduced exactly outside the CI environment.
In this talk, we argue that this is not an inevitable part of software development, but a consequence of treating CI as a special environment. If developers can execute the exact same integration test in the exact same environment on their own machine, they can reproduce, analyze, and fix failures without ever pushing a change.
We demonstrate this workflow using Nix and the NixOS integration test framework, where complete integration test environments, consisting of networks of VMs or containers, and all its dependencies are defined from the ground up and executed identically both locally and in CI.
We will outline what it takes to adopt this philosophy in practice, discuss its limitations, and provide concrete guidance for applying it in existing projects.