Configuring CI to automate testing
Continuous Integration (CI) covers the automation of integrating code changes to find bugs quicker and keep the code base easily maintainable. Usually, this is facilitated by having scripts run automatically when a developer makes a pull/merge request before the code is merged into the main branch. This practice allows us to detect problems with our code early by, for example, running the linter and tests before the code can be merged. As a result, CI gives us more confidence in our code and allows us to make and deploy changes faster and more frequently.
The following figure shows a simple overview of a possible CI/CD pipeline:
Figure 5.7 – Simple overview of a CI/CD pipeline
Note
In this book, we are going to use GitHub Actions for CI/CD. While the syntax and configuration files might look and work differently on other systems, such as GitLab CI/CD or CircleCI, the general principles are similar.
In...