EOS/.github/workflows/pytest.yml
Michael Osthege be0ab5e297 Run tests after merging
Previously tests did not run after merging.

This lead to incompatible changes being merged right after one another.

By running tests on main we will notice breaks earlier.

Other options would be to require every PR to rebase on main before merging.
This is known as requiring linear history and can be changed in the project settings.
2024-10-10 13:52:45 +02:00

32 lines
701 B
YAML

name: Run Pytest on Pull Request
on:
pull_request:
push:
branches: [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
pip install -r requirements-dev.txt
- name: Run Pytest
run: |
pip install -e .
python -m pytest -vs --cov modules --cov-report term-missing tests/