Try to run Docker on Travis

This commit is contained in:
Florian Bruhin 2016-03-15 19:23:49 +01:00
parent cc94e7bfee
commit 62db2c724f
3 changed files with 18 additions and 4 deletions

View File

@ -12,6 +12,12 @@ matrix:
env: TESTENV=py34-cov
- os: linux
env: TESTENV=unittests-nodisp
- os: linux
env: DOCKER=debian-jessie
services: docker
- os: linux
env: DOCKER=archlinux
services: docker
- os: osx
env: TESTENV=py35
- os: linux
@ -38,7 +44,7 @@ install:
- python scripts/dev/ci/install.py
script:
- tox -e $TESTENV
- bash scripts/dev/ci/travis_run.sh
after_success:
- '[[ $TESTENV == *-cov ]] && codecov -e TESTENV -X gcov'

View File

@ -40,13 +40,13 @@ try:
except ImportError:
winreg = None
TESTENV = os.environ['TESTENV']
TESTENV = os.environ.get('TESTENV', None)
TRAVIS_OS = os.environ.get('TRAVIS_OS_NAME', None)
INSTALL_PYQT = TESTENV in ('py34', 'py35', 'py34-cov', 'py35-cov',
'unittests-nodisp', 'vulture', 'pylint')
XVFB = TRAVIS_OS == 'linux' and TESTENV == 'py34'
pip_packages = ['tox']
if TESTENV.endswith('-cov'):
if TESTENV is not None and TESTENV.endswith('-cov'):
pip_packages.append('codecov')
@ -115,7 +115,7 @@ if 'APPVEYOR' in os.environ:
f.write(r'@C:\Python34\python %*')
check_setup(r'C:\Python34\python')
elif TRAVIS_OS == 'linux':
elif TRAVIS_OS == 'linux' and 'DOCKER' not in os.environ:
folded_cmd(['sudo', 'pip', 'install'] + pip_packages)
pkgs = []

View File

@ -0,0 +1,8 @@
#!/bin/bash
if [[ $DOCKER ]]; then
docker build -t img misc/docker/$DOCKER
docker run --privileged -v $PWD:/outside img
else
tox -e $TESTENV
fi