Continuous integration

Last reviewed November 8, 2026

Continuous integration (CI) is the practice of merging every Developer's changes into a shared main version of the code at least once a day, with each merge checked automatically by building the software and running its tests. Problems are found within minutes of being created, while the change is still small and fresh. CI comes from Extreme Programming, and it is one of the practices that make it realistic for a Scrum Team to create a usable Increment many times a Sprint.

A tool that builds code on a server isn't continuous integration on its own. The practice is the habit of integrating often, and fixing a broken build immediately.

What it takes

  • One shared main line of code that everyone merges into.
  • Small, frequent merges. At least daily per Developer. Branches that live for weeks aren't continuous integration.
  • An automated build that compiles the code and runs the tests on every merge.
  • Tests worth trusting. A build that passes should mean the software works.
  • A fast build. If it takes an hour, people stop waiting for it. Ten minutes is a common target.
  • A broken build is fixed first. Nobody merges on top of a broken build. Whoever broke it fixes it, or reverts the change, straight away.

Why it matters for a Scrum Team

The Increment must work together with everything before it. Without CI, integration happens late, often in a painful burst before a release, and problems pile up. With CI, the main line is always close to usable.

It also changes the Definition of Done. "Merged to the main line, with the build passing" can be part of every item's Definition of Done, so integration is never left for later. See Hardening Sprints, and what they hide.

A worked example

How it relates to nearby terms

  • Continuous delivery: keeping the software always ready to release, which builds on CI.
  • Continuous deployment: releasing every change that passes the checks automatically.
  • Increment: CI makes frequent Increments practical. See What is an Increment?.
  • Refactoring: small, frequent refactorings are safe when every change is checked. See What is refactoring?.

Common misunderstandings

"We have a CI server, so we do CI." The server helps, but the practice is merging daily and fixing broken builds immediately.

"CI is only for large teams." Even a team of two benefits from catching problems within minutes.

"Long-lived branches are safer." They delay integration and make every merge riskier.

"CI needs perfect test coverage first." Start with the tests you have, and add tests where defects appear.

Questions

What is continuous integration?

The practice of merging every Developer's changes into a shared main line at least daily, with each merge automatically built and tested, so problems are found within minutes.

Is continuous integration part of Scrum?

No. Scrum doesn't prescribe technical practices. But CI helps a Scrum Team meet the Definition of Done and create usable Increments throughout the Sprint.

How often should Developers integrate?

At least once a day each, and often several times a day. The longer a change stays separate, the harder it is to integrate.

What is the difference between continuous integration and continuous delivery?

Continuous integration keeps the main line built and tested. Continuous delivery goes further and keeps the software always ready to release.

What should happen when the build breaks?

Fixing it becomes the top priority. The person who broke it fixes it or reverts the change, usually within minutes, and nobody merges on top of a broken build.

How long should a CI build take?

Ten minutes or less is a common target. A longer build tempts people to merge without waiting for it, which defeats the purpose. Slow tests can run separately, for example nightly.

Do we need feature switches for continuous integration?

Often, yes. A feature switch lets unfinished work be merged but stay hidden from users, so large features can be integrated daily in small steps.