From the course: Python Data Analytics: From Notebooks to Production

Unlock this course with a free trial

Join today to access over 25,500 courses taught by industry experts.

Continuous integration

Continuous integration

- [Instructor] People tend to make mistakes, they forget to run the test, they forget to add the file to Git, and this is why you have continuous integration, or CI, which is going to run the test automatically every time someone pushes the code. We are going to use GitHub actions for CI, but the idea holds the same for other places as well. So what you need to do is create a .github workflows and then some YAML file. And you see there's main part, main.yml, and python.yml. The main .yml is for LinkedIn Learning internal tasks. So we're not going to look at that, but the Python is for testing the Python. So we give it the name Test Python, and we say, what are the events that are going to trigger this workflow? And we say that push or pull request on the main branch. We say the permissions are only to read, and then we say a series of jobs or steps that are going to happen every time. We say that we're going to run on Ubuntu-latest, this is the usual machine that we want to run. But…

Contents