Skip to content

Commit

Permalink
Add Python 3.6 testing
Browse files Browse the repository at this point in the history
Signed-off-by: Joffrey F <joffrey@docker.com>
  • Loading branch information
shin- committed Jan 23, 2018
1 parent a28b9ff commit 0acef5f
Show file tree
Hide file tree
Showing 8 changed files with 36 additions and 22 deletions.
23 changes: 13 additions & 10 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,15 +1,18 @@
sudo: false
language: python
python:
- "3.5"
env:
- TOX_ENV=py27
# FIXME: default travis worker does not carry py33 anymore. Can this be configured?
# - TOX_ENV=py33
- TOX_ENV=py34
- TOX_ENV=py35
- TOX_ENV=flake8
matrix:
include:
- python: 2.7
env: TOXENV=py27
- python: 3.4
env: TOXENV=py34
- python: 3.5
env: TOXENV=py35
- python: 3.6
env: TOXENV=py36
- env: TOXENV=flake8

install:
- pip install tox
script:
- tox -e $TOX_ENV
- tox
2 changes: 1 addition & 1 deletion Dockerfile-py3
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM python:3.5
FROM python:3.6

RUN mkdir /src
WORKDIR /src
Expand Down
2 changes: 1 addition & 1 deletion Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ def buildImages = { ->
imageNamePy3 = "${imageNameBase}:py3-${gitCommit()}"

buildImage(imageNamePy2, ".", "py2.7")
buildImage(imageNamePy3, "-f Dockerfile-py3 .", "py3.5")
buildImage(imageNamePy3, "-f Dockerfile-py3 .", "py3.6")
}
}
}
Expand Down
24 changes: 17 additions & 7 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ all: test

.PHONY: clean
clean:
-docker rm -vf dpy-dind
-docker rm -f dpy-dind-py2 dpy-dind-py3
find -name "__pycache__" | xargs rm -rf

.PHONY: build
Expand Down Expand Up @@ -45,15 +45,25 @@ TEST_API_VERSION ?= 1.33
TEST_ENGINE_VERSION ?= 17.10.0-ce

.PHONY: integration-dind
integration-dind: build build-py3
docker rm -vf dpy-dind || :
docker run -d --name dpy-dind --privileged dockerswarm/dind:${TEST_ENGINE_VERSION} dockerd\
integration-dind: integration-dind-py2 integration-dind-py3

.PHONY: integration-dind-py2
integration-dind-py2: build
docker rm -vf dpy-dind-py2 || :
docker run -d --name dpy-dind-py2 --privileged dockerswarm/dind:${TEST_ENGINE_VERSION} dockerd\
-H tcp://0.0.0.0:2375 --experimental
docker run -t --rm --env="DOCKER_HOST=tcp://docker:2375" --env="DOCKER_TEST_API_VERSION=${TEST_API_VERSION}"\
--link=dpy-dind:docker docker-sdk-python py.test tests/integration
--link=dpy-dind-py2:docker docker-sdk-python py.test tests/integration
docker rm -vf dpy-dind-py3

.PHONY: integration-dind-py3
integration-dind-py3: build-py3
docker rm -vf dpy-dind-py3 || :
docker run -d --name dpy-dind-py3 --privileged dockerswarm/dind:${TEST_ENGINE_VERSION} dockerd\
-H tcp://0.0.0.0:2375 --experimental
docker run -t --rm --env="DOCKER_HOST=tcp://docker:2375" --env="DOCKER_TEST_API_VERSION=${TEST_API_VERSION}"\
--link=dpy-dind:docker docker-sdk-python3 py.test tests/integration
docker rm -vf dpy-dind
--link=dpy-dind-py3:docker docker-sdk-python3 py.test tests/integration
docker rm -vf dpy-dind-py3

.PHONY: integration-dind-ssl
integration-dind-ssl: build-dind-certs build build-py3
Expand Down
2 changes: 1 addition & 1 deletion appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ version: '{branch}-{build}'
install:
- "SET PATH=C:\\Python27-x64;C:\\Python27-x64\\Scripts;%PATH%"
- "python --version"
- "pip install tox==2.7.0 virtualenv==15.1.0"
- "pip install tox==2.9.1"

# Build the binary after tests
build: false
Expand Down
1 change: 1 addition & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,7 @@
'Programming Language :: Python :: 3.3',
'Programming Language :: Python :: 3.4',
'Programming Language :: Python :: 3.5',
'Programming Language :: Python :: 3.6',
'Topic :: Utilities',
'License :: OSI Approved :: Apache Software License',
],
Expand Down
2 changes: 1 addition & 1 deletion tox.ini
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[tox]
envlist = py27, py33, py34, py35, flake8
envlist = py27, py33, py34, py35, py36, flake8
skipsdist=True

[testenv]
Expand Down
2 changes: 1 addition & 1 deletion win32-requirements.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
-r requirements.txt
pypiwin32==219
pypiwin32>=219

0 comments on commit 0acef5f

Please sign in to comment.