Ch 3 · Continuous Integration
Design principle
16 / 32

Cheap checks first, expensive checks last.

Each gate costs more than the one before it — order them so a cheap failure surfaces before an expensive one runs.

1
Lint

~seconds

2
Unit tests

1-2 min

3
Build

compile/package

4
Integration

several min

5
Scan

vulnerability

6
Push

only if all pass

Same discipline as a manufacturing line's early inline quality checks — catching a defect at the first station is far cheaper than after the whole product is built.