Continuous Integration

CI as a feedback system, not a task runner: what to check, in what order, how to parallelise it, what to cache, and why a slow pipeline changes engineering behaviour.

Continuous Integration

Merging everyone's work into a shared mainline often enough that divergence stays small, and proving the merged result actually works.

Q · What does continuous integration commit you to, beyond having a pipeline that runs on push?
CI Is a Feedback System

The product of a pipeline is a trustworthy verdict delivered while the author still has the change in their head; everything else is overhead.

Q · What is CI actually for, given that the tests would run eventually anyway?
Designing the Pipeline

Order checks by signal per unit of cost, gate on the cheap ones, and be explicit about which checks run on a branch, on trunk, and nightly.

Q · Given a set of checks, in what order should they run and which ones should block?
Parallelising CI

Wall-clock time is set by the longest dependent chain, not by total work — so parallelism helps exactly as far as the graph and the shared resources allow.

Q · The pipeline is slow and we have runner capacity. What actually gets faster when we parallelise, and what does not?
The CI Dependency Graph

A pipeline should be a DAG of real dependencies; stages, sequential steps and path filters are approximations of it, and each approximation has its own way of being wrong.

Q · Which jobs in this pipeline genuinely have to wait for which others, and which are waiting because of how the file is written?
Caching in CI

A cache key is a claim that two inputs are equivalent; when the claim is wrong the pipeline does not get slower, it gets wrong.

Q · What can safely be reused between CI runs, and what does the key have to include for that reuse to be correct?
Triaging a CI Failure

A red pipeline has four common causes with four different correct responses, and telling them apart quickly is a learnable procedure.

Q · The pipeline is red. Is that my change, the environment, a flake, or something already broken on trunk?
CI Security

The pipeline is a privileged production identity that executes code from anyone who can open a pull request — and those two facts have to be kept apart.

Q · What can an attacker do with our CI system, and what is the smallest set of privileges each job actually needs?
Flaky Tests

A test that passes and fails on identical input destroys the verdict for every other test in the run, because it teaches people to re-run until green.

Q · Why is an intermittent test failure more dangerous than a consistent one?