mirror of
https://github.com/Akkudoktor-EOS/EOS.git
synced 2025-09-13 07:21:16 +00:00
Add test for server
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>
This commit is contained in:
10
Makefile
10
Makefile
@@ -9,6 +9,7 @@ help:
|
||||
@echo "Available targets:"
|
||||
@echo " venv - Set up a Python 3 virtual environment."
|
||||
@echo " pip - Install dependencies from requirements.txt."
|
||||
@echo " pip-dev - Install dependencies from requirements-dev.txt."
|
||||
@echo " install - Install EOS in editable form (development mode) into virtual environment."
|
||||
@echo " docker-run - Run entire setup on docker
|
||||
@echo " docs - Generate HTML documentation using pdoc."
|
||||
@@ -27,6 +28,11 @@ pip: venv
|
||||
.venv/bin/pip install -r requirements.txt
|
||||
@echo "Dependencies installed from requirements.txt."
|
||||
|
||||
# Target to install dependencies from requirements.txt
|
||||
pip-dev: pip
|
||||
.venv/bin/pip install -r requirements-dev.txt
|
||||
@echo "Dependencies installed from requirements-dev.txt."
|
||||
|
||||
# Target to install EOS in editable form (development mode) into virtual environment.
|
||||
install: pip
|
||||
.venv/bin/pip install build
|
||||
@@ -54,6 +60,10 @@ run:
|
||||
@echo "Starting flask server, please wait..."
|
||||
.venv/bin/python -m akkudoktoreosserver.flask_server
|
||||
|
||||
# Target to setup tests.
|
||||
test-setup: pip-dev
|
||||
@echo "Setup tests"
|
||||
|
||||
# Target to run tests.
|
||||
test:
|
||||
@echo "Running tests..."
|
||||
|
Reference in New Issue
Block a user