mirror of
https://github.com/Akkudoktor-EOS/EOS.git
synced 2025-07-15 08:16:54 +00:00
A test fixture to start the server and a first test case is added. The fixture tries to assure that the server is installed and running. If it is not installed the fixture uses pip to install it. The server and the installation by pip is run bei the same Python executable that also runs pytest. The github workflow for pytest is adapted to install akkudoktor-eos. Signed-off-by: Bobby Noelte <b0661n0e17e@gmail.com>
32 lines
699 B
YAML
32 lines
699 B
YAML
name: Run Pytest on Pull Request
|
|
|
|
on:
|
|
pull_request:
|
|
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/
|