forked from pact-foundation/pact-python
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
111 lines (81 loc) · 2.02 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
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
DOCS_DIR := ./docs
help:
@echo ""
@echo " clean to clear build and distribution directories"
@echo " deps to install the required files for development"
@echo " verifier to run the verifier end to end tests"
@echo " examples to run the example end to end tests (consumer, fastapi, flask, messaging)"
@echo " consumer to run the example consumer tests"
@echo " fastapi to run the example FastApi provider tests"
@echo " flask to run the example Flask provider tests"
@echo " messaging to run the example messaging e2e tests"
@echo " package to create a distribution package in /dist/"
@echo " release to perform a release build, including deps, test, and package targets"
@echo " test to run all tests"
@echo ""
.PHONY: release
release: deps test package
.PHONY: clean
clean:
rm -rf build
rm -rf dist
rm -rf pact/bin
.PHONY: deps
deps:
pip install -r requirements_dev.txt -e .
define CONSUMER
echo "consumer make"
cd examples/consumer
pip install -q -r requirements.txt
pip install -e ../../
./run_pytest.sh
endef
export CONSUMER
define FLASK_PROVIDER
echo "flask make"
cd examples/flask_provider
pip install -q -r requirements.txt
pip install -e ../../
./run_pytest.sh
endef
export FLASK_PROVIDER
define FASTAPI_PROVIDER
echo "fastapi make"
cd examples/fastapi_provider
pip install -q -r requirements.txt
pip install -e ../../
./run_pytest.sh
endef
export FASTAPI_PROVIDER
define MESSAGING
echo "messaging make"
cd examples/message
pip install -q -r requirements.txt
pip install -e ../../
./run_pytest.sh
endef
export MESSAGING
.PHONY: consumer
consumer:
bash -c "$$CONSUMER"
.PHONY: flask
flask:
bash -c "$$FLASK_PROVIDER"
.PHONY: fastapi
fastapi:
bash -c "$$FASTAPI_PROVIDER"
.PHONY: messaging
messaging:
bash -c "$$MESSAGING"
.PHONY: examples
examples: consumer flask fastapi messaging
.PHONY: package
package:
python setup.py sdist
.PHONY: test
test: deps
flake8
pydocstyle pact
coverage erase
tox
coverage report -m --fail-under=100