added testing environment

This commit is contained in:
Daniel Knüttel 2019-03-13 14:03:07 +01:00
parent a92684735e
commit 4b5d0356db
2 changed files with 24 additions and 0 deletions

14
Dockerfile Normal file
View File

@ -0,0 +1,14 @@
FROM daknuett/python3
ADD . /test
WORKDIR /test
RUN find . -name __pycache__ -exec rm -rf {} +
RUN python3 setup.py install
CMD python3 -m pytest --cov=bunker \
--cov-report=xml:reports/coverage.xml \
--cov-report=term \
--cov-report=html:reports/coverage.html \
--cov-report=annotate -vv test/

10
Makefile Normal file
View File

@ -0,0 +1,10 @@
docker-test: docker-build
sudo docker run -v $(shell pwd)/reports:/test/reports daknuett/bunker:test
docker-build:
sudo docker build . -t daknuett/bunker:test
.PHONY: test
test:
python3 -m pytest -vv test/