mirror of
https://github.com/Akkudoktor-EOS/EOS.git
synced 2025-07-17 01:06:53 +00:00
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.
32 lines
701 B
YAML
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/
|