forked from epfl-si/jahia2wp
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile.mgmt
36 lines (31 loc) · 1.17 KB
/
Makefile.mgmt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
# These targets are to be run from inside the "mgmt" Docker container
.PHONY: test-raw test-travis bootstrap-mgmt pip-install
ifndef WP_ENV
$(error WP_ENV is undefined)
endif
test-raw: /srv/${WP_ENV}/venv
. /srv/${WP_ENV}/venv/bin/activate \
&& export PYTHONPATH=/srv/${WP_ENV}/jahia2wp/src \
&& flake8 --max-line-length=120 src \
&& pytest --cov=./ src \
&& coverage html
# WP_ENV is hardcoded to 'test' for functional tests
functional-tests-raw: /srv/${WP_ENV}/venv
. /srv/${WP_ENV}/venv/bin/activate \
&& export PYTHONPATH=/srv/${WP_ENV}/jahia2wp/src \
&& pytest -vvv -x functional_tests
test-travis: /srv/${WP_ENV}/venv
. /srv/${WP_ENV}/venv/bin/activate \
&& export PYTHONPATH=/srv/${WP_ENV}/jahia2wp/src \
&& export BACKUP_PATH=/tmp/backups \
&& flake8 --max-line-length=120 src \
&& pytest -vv --cov=./ . \
&& codecov
bash -c 'bash <(curl -s https://codecov.io/bash)'
/srv/${WP_ENV}/venv:
cd /srv/${WP_ENV} && virtualenv -p `which python3` venv
$(MAKE) pip-install
bootstrap-mgmt pip-install: /srv/${WP_ENV}/venv
. /srv/${WP_ENV}/venv/bin/activate \
&& export PYTHONPATH=/srv/${WP_ENV}/jahia2wp/src \
&& pip install -r requirements/local.txt