use the venv in all commands

This commit is contained in:
Andreas Zweili 2022-02-08 14:43:51 +01:00
parent 51f47c643a
commit f16f2613d4
1 changed files with 10 additions and 1 deletions

View File

@ -65,15 +65,24 @@ cleanall: clean
.PHONY: init
init:
( \
source venv/bin/activate; \
export DJANGO_SETTINGS_MODULE=network_inventory.settings.local; \
python manage.py loaddata network_inventory.yaml
)
.PHONY: test
test:
( \
source venv/bin/activate; \
export DJANGO_SETTINGS_MODULE=network_inventory.settings.local; \
pytest -nauto --nomigrations --cov=. --cov-report=html
pytest -nauto --nomigrations --cov=. --cov-report=html; \
)
.PHONY: debug
debug:
( \
source venv/bin/activate; \
export DJANGO_SETTINGS_MODULE=network_inventory.settings.local; \
pytest --pdb --nomigrations --cov=. --cov-report=html
)