feat: run pytest for PRs

This commit is contained in:
Daniel Molkentin
2024-10-03 20:46:28 +02:00
parent d987437b01
commit 7b8ca3b840
2 changed files with 31 additions and 0 deletions

29
.github/workflows/pytest.yml vendored Normal file
View File

@@ -0,0 +1,29 @@
name: Run Pytest on Pull Request
on:
pull_request:
branches:
- main # Change this to your default branch if it's not 'main'
jobs:
test:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.12'
- name: Install dependencies
run: |
sudo apt install -y libmariadb3 libmariadb-dev
python -m pip install --upgrade pip
pip install -r requirements.txt
- name: Run Pytest
run: |
python -m pytest -vs --cov modules --cov-report term-missing tests/