-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathMakefile
56 lines (45 loc) · 1.1 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
IMAGE_REPO=ternau
IMAGE_NAME=linkeddata_api
IMAGE_TAG=latest
IMAGE=$(IMAGE_REPO)/$(IMAGE_NAME):$(IMAGE_TAG)
.PHONY: build test test-cov doc doc-live
build:
rm -fr $(CURDIR)/dist/*.whl
docker run --rm -it -v $(CURDIR):/workspace -w /workspace python:3.8 python setup.py bdist_wheel
docker build -t $(IMAGE) .
test-cov-local:
pytest --cov=linkeddata_api tests/ --cov-report html --log-cli-level=info
cov-report:
python -m http.server -d htmlcov
test:
docker run --rm -it \
-v $(CURDIR):/workspace \
-w /workspace \
-u root \
--entrypoint ./ci-scripts/run-tests.sh \
$(IMAGE)
test-cov:
docker run --rm -it \
-v $(CURDIR):/workspace \
-w /workspace \
-u root \
--entrypoint ./ci-scripts/run-tests.sh \
$(IMAGE) \
--cov=linkeddata_api --cov-report=html
doc:
docker run --rm -it \
-v $(CURDIR):/workspace \
-w /workspace \
-u root \
--entrypoint ./ci-scripts/run-docs.sh \
$(IMAGE) \
html
doc-live:
docker run --rm -it \
-p 8000:8000 \
-v $(CURDIR):/workspace \
-w /workspace \
-u root \
--entrypoint ./ci-scripts/run-docs.sh \
$(IMAGE) \
live