diff options
author | Philipp Hagemeister <phihag@phihag.de> | 2019-10-18 03:02:43 +0200 |
---|---|---|
committer | Philipp Hagemeister <phihag@phihag.de> | 2019-10-18 03:05:06 +0200 |
commit | f92edc4e6163db3ea67b282acf79936f31b73009 (patch) | |
tree | 9984787d5d2786e941bc7d60812dcdca1129c0b3 | |
parent | 10a3a5e5f9807c039b6642fe4f64a951d8093cd4 (diff) | |
download | ipaddress-f92edc4e6163db3ea67b282acf79936f31b73009.tar.gz |
Comprehensive docker testing
Docker in conjuction with make allows us to test all 4 supported Python versions in parallel.
Add Dockerfiles for 2.6 and 2.7, and rename the existing dockerfiles to end in `.Dockerfile`.
-rw-r--r-- | Makefile | 16 | ||||
-rw-r--r-- | test-python2.6.Dockerfile (renamed from Dockerfile.python2.6) | 2 | ||||
-rw-r--r-- | test-python2.7.Dockerfile (renamed from Dockerfile.python2.7) | 2 | ||||
-rw-r--r-- | test-python3.2.Dockerfile | 8 | ||||
-rw-r--r-- | test-python3.3.Dockerfile | 8 |
5 files changed, 33 insertions, 3 deletions
@@ -21,8 +21,22 @@ release: git push --tags $(MAKE) pypi +docker-test-all: docker-test-2.6 docker-test-2.7 docker-test-3.2 docker-test-3.3 + +docker-test-2.6: + docker build -t ipaddress-python2.6 . -f test-python2.6.Dockerfile + +docker-test-2.7: + docker build -t ipaddress-python2.7 . -f test-python2.7.Dockerfile + +docker-test-3.2: + docker build -t ipaddress-python3.2 . -f test-python3.2.Dockerfile + +docker-test-3.3: + docker build -t ipaddress-python3.3 . -f test-python3.3.Dockerfile + clean: rm -rf -- build dist ipaddress.egg-info -.PHONY: default test clean pypi lint +.PHONY: default test clean pypi lint docker-test-all docker-test-2.6 docker-test-2.7 docker-test-3.2 docker-test-3.3 diff --git a/Dockerfile.python2.6 b/test-python2.6.Dockerfile index 1c11f9f..5e16329 100644 --- a/Dockerfile.python2.6 +++ b/test-python2.6.Dockerfile @@ -1,7 +1,7 @@ FROM lovato/python-2.6.6 # Dockerfile to run tests under python2.6 -# docker build -t ipaddress-python2.6 . -f Dockerfile.python2.6 +# docker build -t ipaddress-python2.6 . -f test-python2.6.Dockerfile ADD . . RUN python test_ipaddress.py diff --git a/Dockerfile.python2.7 b/test-python2.7.Dockerfile index 0e92635..9c58f6b 100644 --- a/Dockerfile.python2.7 +++ b/test-python2.7.Dockerfile @@ -1,7 +1,7 @@ FROM python:2.7-alpine # Dockerfile to run tests under python2.7 -# docker build -t ipaddress-python2.7 . -f Dockerfile.python2.7 +# docker build -t ipaddress-python2.7 . -f test-python2.7.Dockerfile RUN apk add make RUN pip install flake8 diff --git a/test-python3.2.Dockerfile b/test-python3.2.Dockerfile new file mode 100644 index 0000000..56d2b46 --- /dev/null +++ b/test-python3.2.Dockerfile @@ -0,0 +1,8 @@ +FROM python:3.2-slim +# Dockerfile to run tests under python3.2 + +# docker build -t ipaddress-python3.2 . -f test-python3.2.Dockerfile + +ADD . . +RUN python test_ipaddress.py +CMD python test_ipaddress.py diff --git a/test-python3.3.Dockerfile b/test-python3.3.Dockerfile new file mode 100644 index 0000000..87c504e --- /dev/null +++ b/test-python3.3.Dockerfile @@ -0,0 +1,8 @@ +FROM python:3.3-alpine +# Dockerfile to run tests under python3.3 + +# docker build -t ipaddress-python3.3 . -f test-python3.3.Dockerfile + +ADD . . +RUN python test_ipaddress.py +CMD python test_ipaddress.py |