-
Notifications
You must be signed in to change notification settings - Fork 11
/
Makefile
34 lines (30 loc) · 901 Bytes
/
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
PROJECT := lookout-sdk
# Including ci Makefile
CI_REPOSITORY ?= https://github.com/src-d/ci.git
CI_BRANCH ?= v1
CI_PATH ?= .ci
MAKEFILE := $(CI_PATH)/Makefile.main
$(MAKEFILE):
git clone --quiet --depth 1 -b $(CI_BRANCH) $(CI_REPOSITORY) $(CI_PATH);
-include $(MAKEFILE)
ifdef ($(VIRTUAL_ENV),)
PIP_ARGS := --user
endif
# Generate go+python code from .proto files
.PHONY: check-protoc
check-protoc:
./_tools/install-protoc-maybe.sh
.PHONY: check-gogofaster
check-gogofaster:
./_tools/install-gogofaster-maybe.sh
.PHONY: protogen
protogen: check-protoc check-gogofaster
./_tools/protogen_golang.sh
pip3 install $(PIP_ARGS) grpcio_tools==1.13.0
./_tools/protogen_python.sh
test-python-sdk:
pip3 install $(PIP_ARGS) coverage==4.5.3
cd python && python3 setup.py install
coverage run --omit "python/tests/*" --branch -m unittest discover python
coverage report -m
test: test-python-sdk