In Continuous Integration, Run Fast and Fundamental Tests First
Blog post from Semaphore
In continuous integration and continuous delivery (CI/CD) pipelines, prioritizing fast feedback is crucial, and this can be achieved by emphasizing unit tests, which run quickly and check fundamental business logic in isolation, thereby identifying critical issues early. A common practice is to use parallel jobs in CI setups, but a more efficient strategy involves customizable pipelines with sequential blocks that halt upon failure, saving time and resources by avoiding unnecessary high-level tests. Additional techniques for optimizing CI processes include conditional stage execution to defer certain tests until necessary, a fail-fast strategy to stop all jobs once a failure occurs, and automatic cancellation of queued builds to focus on relevant revisions. These approaches help developers receive immediate feedback on trivial errors and understand the performance implications of tests as codebases grow.