Pipelineseasy0-2 years
A team's pipeline runs integration tests (Testcontainers, several minutes) before unit tests and lint. A new engineer reorders it to lint, unit tests, build, then integration tests. What's the actual argument for that order, beyond "it's the convention"?
The order is chosen by cost and by how much a failure tells you, not by habit. Lint and compile fail in seconds and catch most typos; unit tests take about a minute; the build produces the artifact every later stage needs; integration tests take minutes and need Docker. Running integration tests first means a developer who made a typo waits several minutes and spins up Testcontainers just to learn something lint would have told them in seconds. Ordering cheap, fast checks before slow, expensive ones means the common case (a small mistake) is reported almost immediately, and the pipeline only pays for the expensive stage once the cheap ones have already passed.