From ce3e24163eca91c69fc799d2b5a324d7f7dadd44 Mon Sep 17 00:00:00 2001 From: Florian Bruhin Date: Wed, 8 Feb 2017 14:02:03 +0100 Subject: [PATCH] Add test environments using PyQt from PyPI Fixes #2083 --- .travis.yml | 15 ++++++++++++ scripts/dev/ci/travis_install.sh | 7 +++++- tox.ini | 40 ++++++++++++++++++++++++++++++++ 3 files changed, 61 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 5991fea42..ce8424f42 100644 --- a/.travis.yml +++ b/.travis.yml @@ -21,9 +21,24 @@ matrix: - os: linux env: DOCKER=ubuntu-xenial services: docker + - os: linux + language: python + python: 3.5 + env: TESTENV=py35-pyqt56 + - os: linux + language: python + python: 3.5 + env: TESTENV=py35-pyqt571 + - os: linux + language: python + python: 3.6 + env: TESTENV=py36-pyqt571 - os: osx env: TESTENV=py36 OSX=elcapitan osx_image: xcode7.3 + - os: osx + env: TESTENV=py36-pyqt571 OSX=elcapitan + osx_image: xcode7.3 # https://github.com/qutebrowser/qutebrowser/issues/2013 # - os: osx # env: TESTENV=py35 OSX=yosemite diff --git a/scripts/dev/ci/travis_install.sh b/scripts/dev/ci/travis_install.sh index 5317e2135..cf571f3fd 100644 --- a/scripts/dev/ci/travis_install.sh +++ b/scripts/dev/ci/travis_install.sh @@ -93,7 +93,9 @@ elif [[ $TRAVIS_OS_NAME == osx ]]; then sudo -H python get-pip.py brew --version - brew_install python3 qt5 pyqt5 + + brew_install python3 + [[ $TESTENV != *-pyqt* ]] && brew_install qt5 pyqt5 pip_install -r misc/requirements/requirements-tox.txt pip --version @@ -116,6 +118,9 @@ case $TESTENV in apt_install xvfb $pyqt_pkgs libpython3.4-dev check_pyqt ;; + py3*-pyqt*) + apt_install xvfb libpython3.4-dev + ;; pylint|vulture) apt_install $pyqt_pkgs libpython3.4-dev check_pyqt diff --git a/tox.ini b/tox.ini index 8d31dd961..bc7c05a54 100644 --- a/tox.ini +++ b/tox.ini @@ -22,6 +22,9 @@ commands = {envpython} scripts/link_pyqt.py --tox {envdir} {envpython} scripts/dev/run_pytest.py {posargs:tests} + +# test envs with coverage + [testenv:py36-cov] basepython = python3.6 setenv = {[testenv]setenv} @@ -52,6 +55,43 @@ commands = {envpython} scripts/dev/run_pytest.py --cov --cov-report xml --cov-report=html --cov-report= {posargs:tests} {envpython} scripts/dev/check_coverage.py {posargs} +# test envs with PyQt5 from PyPI + +[testenv:py35-pyqt56] +basepython = python3.5 +setenv = + {[testenv]setenv} + QUTE_BDD_WEBENGINE=true +passenv = {[testenv]passenv} +deps = + {[testenv]deps} + PyQt5==5.6 +commands = {envpython} scripts/dev/run_pytest.py {posargs:tests} + +[testenv:py35-pyqt571] +basepython = python3.5 +setenv = + {[testenv]setenv} + QUTE_BDD_WEBENGINE=true +passenv = {[testenv]passenv} +deps = + {[testenv]deps} + PyQt5==5.7.1 +commands = {envpython} scripts/dev/run_pytest.py {posargs:tests} + +[testenv:py36-pyqt571] +basepython = python3.6 +setenv = + {[testenv]setenv} + QUTE_BDD_WEBENGINE=true +passenv = {[testenv]passenv} +deps = + {[testenv]deps} + PyQt5==5.7.1 +commands = {envpython} scripts/dev/run_pytest.py {posargs:tests} + +# other envs + [testenv:mkvenv] basepython = python3 commands = {envpython} scripts/link_pyqt.py --tox {envdir}