diff --git a/.travis.yml b/.travis.yml index 925354477..c6175a0b9 100644 --- a/.travis.yml +++ b/.travis.yml @@ -12,7 +12,7 @@ env: - PATH=/home/travis/bin:/home/travis/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin matrix: - TESTENV=py35 - - TESTENV=py34 + - TESTENV=py34-cov - TESTENV=unittests-nodisp - TESTENV=misc - TESTENV=vulture @@ -38,14 +38,14 @@ script: - tox -e $TESTENV -- -v --cov-report term tests after_success: - - '[[ ($TESTENV == py34 || $TESTENV == py35) && $TRAVIS_OX == linux ]] && codecov -e TESTENV -X gcov' + - '[[ $TESTENV == *-cov ]] && codecov -e TESTENV -X gcov' matrix: exclude: - os: linux env: TESTENV=py35 - os: osx - env: TESTENV=py34 + env: TESTENV=py34-cov - os: osx env: TESTENV=unittests-nodisp - os: osx diff --git a/scripts/dev/ci_install.py b/scripts/dev/ci_install.py index 9e3d1d25d..e2be0163b 100644 --- a/scripts/dev/ci_install.py +++ b/scripts/dev/ci_install.py @@ -40,11 +40,11 @@ except ImportError: TESTENV = os.environ['TESTENV'] TRAVIS_OS = os.environ.get('TRAVIS_OS_NAME', None) -INSTALL_PYQT = TESTENV in ('py34', 'py35', 'unittests-nodisp', 'vulture', - 'pylint') +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 in ['py34', 'py35'] and TRAVIS_OS == 'linux': +if TESTENV.endswith('-cov'): pip_packages.append('codecov') diff --git a/tox.ini b/tox.ini index b1e26db3f..1479bfdba 100644 --- a/tox.ini +++ b/tox.ini @@ -4,7 +4,7 @@ # and then run "tox" from this directory. [tox] -envlist = py34,py35,misc,vulture,pep257,flake8,pylint,pyroma,check-manifest +envlist = py34,py35-cov,misc,vulture,pep257,flake8,pylint,pyroma,check-manifest [testenv] # https://bitbucket.org/hpk42/tox/issue/246/ - only needed for Windows though @@ -44,6 +44,25 @@ deps = wheel==0.26.0 xvfbwrapper==0.2.7 cherrypy==4.0.0 +commands = + {envpython} scripts/link_pyqt.py --tox {envdir} + {envpython} -m py.test --strict -rfEsw --faulthandler-timeout=70 --instafail {posargs:tests} + +[testenv:py35-cov] +basepython = python3.5 +setenv = {[testenv]setenv} +passenv = {[testenv]passenv} +deps = {[testenv]deps} +commands = + {envpython} scripts/link_pyqt.py --tox {envdir} + {envpython} -m py.test --strict -rfEsw --faulthandler-timeout=70 --instafail --cov --cov-report xml --cov-report=html --cov-report= {posargs:tests} + {envpython} scripts/dev/check_coverage.py {posargs} + +[testenv:py34-cov] +basepython = python3.4 +setenv = {[testenv]setenv} +passenv = {[testenv]passenv} +deps = {[testenv]deps} commands = {envpython} scripts/link_pyqt.py --tox {envdir} {envpython} -m py.test --strict -rfEsw --faulthandler-timeout=70 --instafail --cov --cov-report xml --cov-report=html --cov-report= {posargs:tests}