Event 1: Before opening a pull request
Event 2: Before merging a feature branch into the development branch
Event 3: Before pushing to the development branch
Workflow (same for all events):Job:
Spin up a machine with Ubuntu 22.04 (LTS) x64
Would this be a machine provisioned by Github or a Digital Ocean Droplet? A Github-hosted runner can be used.
Install the following software:
Docker
Python3
Install the Python dependencies in requirements.txt
Start docker using the docker-compose.yml file
Run pytest. Prevent the merge if test fail.
Github Actions
Github-hosted runner is a machine that executes a single job. A runner can clone the repo locally, install software, and run commands to test the code. It's basically the same thing as running the app via an ephemeral server provisioned by an Ansible Playbook. Github can provision the runners, or you can provide your own runners.
Goal
Event 1: Before opening a pull request Event 2: Before merging a feature branch into the development branch Event 3: Before pushing to the development branch Workflow (same for all events): Job:
Spin up a machine with Ubuntu 22.04 (LTS) x64
Install the following software:
Install the Python dependencies in requirements.txt
Start docker using the docker-compose.yml file
Run pytest. Prevent the merge if test fail.
Github Actions
Figuring out how Github Actions work