-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
53 lines (41 loc) · 1.42 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
PROJECT=blaupause
IPYNBPATH=docs/ipynb/*.ipynb
CODECOVTOKEN=1a84bf68-02e9-4313-b11b-f08df6ed7235
PYTHON?=python3
test:
$(PYTHON) -m pytest
test-test:
$(PYTHON) -c "import sys; import $(PROJECT); sys.exit($(PROJECT).test())"
test-coverage:
$(PYTHON) -m pytest -v --cov=$(PROJECT) --cov-config .coveragerc
test-docs:
$(PYTHON) -m pytest -v --doctest-modules --ignore=$(PROJECT)/tests $(PROJECT)
test-ipynb:
$(PYTHON) -m pytest -v --nbval $(IPYNBPATH)
test-pycodestyle:
$(PYTHON) -m pycodestyle --filename=*.py .
test-all: test-test test-coverage test-docs test-ipynb test-pycodestyle
upload-coverage: SHELL:=/bin/bash
upload-coverage:
bash <(curl -s https://codecov.io/bash) -t $(CODECOVTOKEN)
travis-build: SHELL:=/bin/bash
travis-build:
ci_env=`bash <(curl -s https://codecov.io/env)`
docker build -f docker/Dockerfile -t dockertestimage .
docker run -e ci_env -ti -d --name testcontainer dockertestimage
docker exec testcontainer make test-all
docker exec testcontainer make upload-coverage
docker stop testcontainer
docker rm testcontainer
test-docker:
docker build -f docker/Dockerfile -t dockertestimage .
docker run -ti -d --name testcontainer dockertestimage
docker exec testcontainer find . -name '*.pyc' -delete
docker exec testcontainer make test-all
docker stop testcontainer
docker rm testcontainer
build-dists:
rm -rf dist/
$(PYTHON) setup.py sdist bdist_wheel
release: build-dists
twine upload dist/*