-
Notifications
You must be signed in to change notification settings - Fork 13
/
Copy pathMakefile
70 lines (54 loc) · 1.66 KB
/
Makefile
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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
#!/usr/bin/make
# WARN: gmake syntax
########################################################
# Makefile for Ansible message bus worker
#
# useful targets:
# make tests ---------------- run the test
# make pyflakes, make pep8 -- source code checks
########################################################
# variable section
PY := python3
VENV := .venv
VENV_BIN := ${VENV}/bin
GH_OAUTH_KEY :=
GH_OAUTH_SECRET :=
# used in ghauth handler
PROXY_HOST :=
PROXY_PORT :=
API_SERVER_ARGS := server --workspace=test/fixtures/workspace --host 0.0.0.0
NOSETESTS := ${VENV_BIN}/nosetests
PYFLAKES := ${VENV_BIN}/pyflakes
-include local.mk
NAME = "pipelines"
OS = $(shell uname -s)
export GH_OAUTH_KEY
export GH_OAUTH_SECRET
export PROXY_HOST
export PROXY_PORT
.PHONY: test
${VENV}:
python3 -m venv ${VENV}
install: ${VENV}
${VENV}/bin/pip install -U pip
${VENV}/bin/pip install -U pipenv
${VENV}/bin/pipenv install -d
run:
PROXY_HOST=${PROXY_HOST} PROXY_PORT=${PROXY_PORT} \
GH_OAUTH_KEY=${GH_OAUTH_KEY} GH_OAUTH_SECRET=${GH_OAUTH_SECRET} \
${VENV}/bin/python -m pipelines ${API_SERVER_ARGS}
test:
# PYTHONPATH=./pipelines $(NOSETESTS) -d -v -w test/*
PYTHONPATH=. $(NOSETESTS) -d -v -w test
pep8:
@echo "#############################################"
@echo "# Running PEP8 Compliance Tests"
@echo "#############################################"
${VENV_BIN}/pep8 -r --ignore=E501,E221,W291,W391,E302,E251,E203,W293,E231,E303,E201,E225,E261,E241 bin/ pipelines/
pyflakes:
${PYFLAKES} test/*/*.py pipelines/*py pipelines/*/*py bin/*
sync-requirements:
${VENV_BIN}/pipenv-setup sync
${VENV_BIN}/autopep8 -i -a -a setup.py
lint:
${VENV_BIN}/pylint --disable C,R,W pipelines