Skip to article frontmatterSkip to article content
PrerequisiteImportanceNotes
Experience with the command lineNecessaryContinuous integration will follow command line instructions
Version controlNecessaryContinuous integration runs every time a new commit is made to your project
Reproducible computational environmentsNecessaryContinuous integration runs your tests on a separate computer (usually in the cloud) so you need to set it up in the same way.
TestingVery helpfulContinuous integration tests if anything important has changed when you make a change in your project

Summary

Continuous integration (CI) is the practice of integrating changes to a project made by individuals into a main, shared version frequently (usually multiple times per day). CI software is also typically used to identify any conflicts and bugs that are introduced by changes, so they are found and fixed early, minimising the effort required to do so. Running tests regularly also saves humans from needing to do it manually. By making users aware of bugs as early as possible researchers (if the project is a research project) do not waste a lot of time doing work that may need to be thrown away, which may be the case if tests are run infrequently and results are produced using faulty code.

A sketch showing how continuous integration helps developers plan, design, integrate code into a shared repository, and then observe the influence of any changes.

Figure 1:The Turing Way project illustration by Scriberia. Used under a CC-BY 4.0 licence. DOI: The Turing Way Community & Scriberia (2024).

Motivation and Background

CI has a number of key benefits:

  • Helps bugs to be found early, minimising their damage and making them easier to fix
  • Keeps project contributors up to date with each other’s work so they can benefit from it as soon as possible
  • Encourages users to write tests
  • Automates running of tests
  • Ensures tests are run frequently
References
  1. The Turing Way Community, & Scriberia. (2024). Illustrations from The Turing Way: Shared under CC-BY 4.0 for reuse. Zenodo. 10.5281/ZENODO.3332807