Software Engineering at Google Chapter #23 - Continuous Integration
(1 of 3)
Continuous Integration is "a software development practice where
members of a team integrate their work frequently..."
This integration also applies to integrations such as...
External APIs that the software must interface with
The underlying OS, devices, or platforms
Data that is ingested for computation and manipulation
And so on. Not just code dependencies.
As such, a more modern definition might be "the continual
assembling and testing of our entire complex and rapidly changing
CI is about which tests to run and when to run them during the
CI is also about how to compose the SUT (System Under Test) where
the code will be tested while balancing concerns about costs and
Which tests should be run at pre-submit? Which ones are run
It may be dangerous for code to test using production backends
because simply testing bad (yet correct) code could lead to a
Yet testing against production backends may be ok for a staging or
CI is about "testing the right things at the right time" in the
CI allows you to guarantee correctness at various stages of the
build and deploy. You don't need to hope the code works because
you are able to test it at each stage, thus creating confidence in
The cost to fix a bug grows exponentially the later it is found
(think found at pre-submit check vs found in production)
Some breakpoints in a workflow where a bug might be found are...
Edit / compile / debug stage
Release candidate promotions and testing (dev, staging,
Final release candidate promotion into production
The later that the bug is discovered...
The person who originally wrote the code won't be the one who
finds the bug
The original author will need to put more mental energy into
recalling what their code change did
The bug may negatively affect others
In summary, you want to create fast feedback loops so bugs are
discovered and corrected as early as possible