Add pytest automated testing #19
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: pytests | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
- name: Set up Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: '3.12' | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install poetry | |
- name: Install dependencies | |
run: poetry install | |
- name: Install Zot (OCI Registry) | |
run: | | |
sudo wget -O /usr/bin/zot https://github.com/project-zot/zot/releases/download/v2.1.0/zot-linux-amd64 | |
sudo chmod +x /usr/bin/zot | |
sudo chown root:root /usr/bin/zot | |
- name: serve zot | |
run: zot serve zot/config.json | |
- name: Run tests with pytest | |
run: poetry run pytest | |