Utilisation du makefile pour installer l'environnement virtuel

This commit is contained in:
Guillaume Ayoub 2018-05-11 18:11:57 +02:00
parent f6d0e8ace0
commit e7cf34f317
2 changed files with 2 additions and 3 deletions

View File

@ -4,7 +4,7 @@ python:
- 3.6
install:
- pip install --upgrade -e.[test]
- make install
script:
- make test

View File

@ -2,7 +2,6 @@ VENV = $(PWD)/.env
PIP = $(VENV)/bin/pip
PYTHON = $(VENV)/bin/python
FLASK = $(VENV)/bin/flask
PYTEST = $(VENV)/bin/pytest
all: install serve
@ -19,7 +18,7 @@ check-outdated:
$(PIP) list --outdated --format=columns
test:
$(PYTEST) tests.py --flake8 --isort --cov=afpy --cov=tests --cov-report=term-missing
$(PYTHON) -m pytest tests.py --flake8 --isort --cov=afpy --cov=tests --cov-report=term-missing
serve:
env FLASK_APP=afpy.py FLASK_ENV=development $(VENV)/bin/flask run