CI/CD · Ship safely, repeatedly

What does continuous integration actually require?

Easycontinuous integrationtrunkautomated testsUpdated Oct 2026
Quiz this track

Short answer

CI means merging small changes into a shared mainline frequently and running an automated build and test suite on every merge. The goal is to find integration problems within minutes, not at the end of a release cycle.

The defining behaviour is a shared mainline that everyone integrates into, plus automation that runs on each integration. A team that opens long-lived branches and runs a nightly build is doing scheduled integration, not continuous integration.

  • Every commit to main triggers a build and the fast test suite
  • Changes are small enough that a failure points to a narrow set of edits
  • The build is deterministic: the same commit and inputs produce the same result
  • A broken main is treated as the top priority and is fixed or reverted quickly
  • Tests and tooling run locally too, so the pipeline is not the first place a problem appears
sh
git switch main
git pull --rebase
git switch -c fix/retry-timeout
git commit -m 'Bound retry timeout'
git push origin fix/retry-timeout
Short-lived branches keep integration frequent and conflicts cheap.
A slow or flaky CI suite defeats the purpose because people stop trusting it and batch larger changes. Keep the merge-blocking suite fast and move expensive suites to a later stage.

Follow-ups you should expect

Interviewers use these to check whether the first answer was understanding or memorisation.

  1. 1How often should a developer merge to main?
  2. 2What do you do when the main build is red?
  3. 3How do you handle a test suite that takes 45 minutes?
  4. 4Does CI require every test to run on every commit?

Say it in the interview

Continuous integration requires a shared mainline, small and frequent merges, and an automated build that runs on every integration. I want a failure to point at a small change and I want the team to treat a red main as urgent, usually by reverting first. The suite has to be fast and trustworthy, otherwise people bypass it. Expensive tests can run later, but the merge gate must stay quick and deterministic.

Use this as a model, not a script. Saying it in your own words is what makes it survive follow-up pressure.

Related questions

Reading is step one

Now say it out loud.

Understanding an answer and delivering it under pressure are different skills. Rehearse this topic in a live CI/CD mock interview and get scored feedback on depth, clarity and confidence.