Summary and Schedule
This lesson provides an introduction into Continuous Integration (CI) and Continuous Delivery / Deployment (CD) using GitHub Actions
After learning how to test code and packaging for distribution, one would like to automate these tasks as much as possible.
This is where CI and CD tools come in: automating code integrations and deployments continously!
Prerequisites
- Familiar with git
- Familiar with Python
- Text editor
- GitHub Account
Setup Instructions | Download files required for the lesson | |
Duration: 00h 00m | 1. Introduction | What is continuous integration / continuous deployment? |
Duration: 00h 05m | 2. Exit Codes | What is an exit code? |
Duration: 00h 20m | 3. Understanding Yet Another Markup Language | What is YAML? |
Duration: 00h 25m | 4. YAML and GitHub Actions | What is the GitHub Actions specification? |
Duration: 00h 30m | 5. Hello CI World | How do I run a simple GitHub Actions job? |
Duration: 00h 40m | 6. CI for Python Package | How do I setup CI for a Python package in GitHub Actions? |
Duration: 01h 00m | 7. Matrix | How do I run CI for multiple Python versions and /or different platforms? |
Duration: 01h 30m | 8. CD for Python Package | How do I setup CD for a Python package in GitHub Actions? |
Duration: 02h 00m | 9. Badge for CI/CD | How to add something that communicates / visualizes the status of CI/CD? |
Duration: 02h 05m | 10. (Bonus) Discuss CI/CD for Documentation | What is the documetation artifact and what does CI/CD look like for this? |
Duration: 02h 10m | 11. (Bonus) Quick primer on Containers | What is a container and why would I want to publish one? |
Duration: 02h 20m | 12. (Bonus) Implementing CI/CD for documentation using containers | How to setup CI/CD for documentation using containers? |
Duration: 02h 40m | Finish |
The actual schedule may vary slightly depending on the topics and exercises chosen by the instructor.
Set up Python
Part of this lesson consists in learning how to make scripts exit correctly. At some point, we will need to test exit codes with Pytest, Python testing tool.
To know whether your Python has pytest
, just run
python -c "import pytest"
. If this command returns nothing,
it means everything is fine. Otherwise, please visit https://docs.pytest.org/en/stable/getting-started.html
for installation.
Set up Python project code
Notice
We will be reusing the materials from the INTERSECT packaging lesson for our Python project code sample.
- Create a new project from template https://github.com/marshallmcdonnell/intersect-training-packaging-example
- Name it
intersect-training-cicd
.
Callout
If you’re having issues, please let us know immediately since you might not be able to follow this lesson without a proper setup.
Set up Docker (optional)
- Install Docker: https://docs.docker.com/engine/install/
To check your installation open a terminal and run:
bash docker --version
Note that you may
have to run with sudo. If you don’t want to preface the
docker command with sudo, you may need to checkout https://docs.docker.com/engine/install/linux-postinstall/.