From 4b5d0356dbfc2dd70638543ae392e1514031b20b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Kn=C3=BCttel?= Date: Wed, 13 Mar 2019 14:03:07 +0100 Subject: [PATCH] added testing environment --- Dockerfile | 14 ++++++++++++++ Makefile | 10 ++++++++++ 2 files changed, 24 insertions(+) create mode 100644 Dockerfile create mode 100644 Makefile diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..ec43bee --- /dev/null +++ b/Dockerfile @@ -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/ diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..032d387 --- /dev/null +++ b/Makefile @@ -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/