Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
45 changes: 21 additions & 24 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,45 +3,42 @@ sudo: required
dist: trusty

env:
- PYTEST_QT_API=pyqt4 PYTHON=python2.7
- PYTEST_QT_API=pyqt4v2 PYTHON=python2.7
- PYTEST_QT_API=pyside PYTHON=python2.7
global:
# used by ci-helpers
- CONDA_CHANNELS=conda-forge SETUP_XVFB=true DEPS="pytest tox coveralls"

- PYTEST_QT_API=pyqt4 PYTHON=python3.4
- PYTEST_QT_API=pyqt4v2 PYTHON=python3.4
- PYTEST_QT_API=pyside PYTHON=python3.4
- PYTEST_QT_API=pyqt5 PYTHON=python3.4
matrix:
- PYTEST_QT_API=pyqt4 PYQT_PACKAGE="pyqt=4.*" PYTHON_VERSION=2.7
- PYTEST_QT_API=pyqt4v2 PYQT_PACKAGE="pyqt=4.*" PYTHON_VERSION=2.7
- PYTEST_QT_API=pyside PYQT_PACKAGE="pyside=1.*" PYTHON_VERSION=2.7

- PYTEST_QT_API=pyqt4 PYQT_PACKAGE="pyqt=4.*" PYTHON_VERSION=3.4
- PYTEST_QT_API=pyqt4v2 PYQT_PACKAGE="pyqt=4.*" PYTHON_VERSION=3.4
- PYTEST_QT_API=pyside PYQT_PACKAGE="pyside=1.*" PYTHON_VERSION=3.4
- PYTEST_QT_API=pyqt5 PYQT_PACKAGE="pyqt=5.*" PYTHON_VERSION=3.4

install:
- sudo apt-get update

# Xvfb / window manager
- sudo apt-get install -y xvfb herbstluftwm

# Qt
- $PYTHON scripts/install-qt.py

# Pip (3.4 does not have it by default)
- wget https://bootstrap.pypa.io/get-pip.py
- sudo $PYTHON get-pip.py

# Dependencies
- sudo $PYTHON -m pip install -U pytest tox coveralls
# Setup miniconda
- git clone --depth 1 git://github.com/astropy/ci-helpers.git
- CONDA_DEPENDENCIES="${DEPS} ${PYQT_PACKAGE}" source ci-helpers/travis/setup_conda.sh
- source activate test && pip install -e .

# pytest-qt
- sudo $PYTHON setup.py develop

before_script:
- "export DISPLAY=:99.0"
- start-stop-daemon --start --background --exec /usr/bin/Xvfb -- $DISPLAY -screen 0 1024x768x24
- sleep 3 # give xvfb some time to start
- "herbstluftwm &"
- sleep 1

script:
- catchsegv coverage run --source=pytestqt -m pytest tests
- sudo tox -e lint
- sudo chmod -R a+rw .
- source activate test && catchsegv coverage run --source=pytestqt -m pytest tests
# for some reason tox doesn't get installed with a u+x flag
- |
chmod u+x /home/travis/miniconda/envs/test/bin/tox
/home/travis/miniconda/envs/test/bin/tox -e lint

after_success:
- coveralls
Expand Down
1 change: 1 addition & 0 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,7 @@ Many thanks to:
- Florian Bruhin (`@The-Compiler <https://github.com/The-Compiler>`_);
- Guilherme Quentel Melo (`@gqmelo <https://github.com/gqmelo>`_);
- Francesco Montesano (`@montefra <https://github.com/montefra>`_);
- Roman Yurchak (`@rth <https://github.com/rth>`_)

**Powered by**

Expand Down
75 changes: 54 additions & 21 deletions appveyor.yml
Original file line number Diff line number Diff line change
@@ -1,27 +1,60 @@
environment:
matrix:
- INSTALL_QT: "py34-pyqt5"
TESTENVS: "py34-pyqt5"

- INSTALL_QT: "py35-pyqt5"
TESTENVS: "py35-pyqt5"

- INSTALL_QT: "py34-pyqt4"
TESTENVS: "py34-pyqt4"
# Adapted from the qtpy Appveyor setup

- INSTALL_QT: "py27-pyqt4"
TESTENVS: "py27-pyqt4"
environment:
global:
PYTHON: "C:\\conda"
CMD_IN_ENV: "cmd /E:ON /V:ON /C .\\ci-helpers\\appveyor\\windows_sdk.cmd"
PYTHON_ARCH: "64" # needs to be set for CMD_IN_ENV to succeed. If a mix
# of 32 bit and 64 bit builds are needed, move this
# to the matrix section.
# Used by atropy ci-helpers
CONDA_CHANNELS: "conda-forge"

- TESTENVS: "py27-pyside,py34-pyside,lint"
matrix:
- PYTHON_VERSION: "2.7"
PYTEST_QT_API: "pyqt4"
CONDA_DEPENDENCIES: "pytest pyqt=4.*"
- PYTHON_VERSION: "2.7"
PYTEST_QT_API: "pyqt4v2"
CONDA_DEPENDENCIES: "pytest pyqt=4.*"
- PYTHON_VERSION: "2.7"
PYTEST_QT_API: "pyside"
CONDA_DEPENDENCIES: "pytest pyside=1.*"

- PYTHON_VERSION: "3.4"
PYTEST_QT_API: "pyqt4"
CONDA_DEPENDENCIES: "pytest pyqt=4.*"
- PYTHON_VERSION: "3.4"
PYTEST_QT_API: "pyqt4v2"
CONDA_DEPENDENCIES: "pytest pyqt=4.*"
- PYTHON_VERSION: "3.4"
PYTEST_QT_API: "pyside"
CONDA_DEPENDENCIES: "pytest pyside=1.*"
- PYTHON_VERSION: "3.4"
PYTEST_QT_API: "pyqt5"
CONDA_DEPENDENCIES: "pytest pyqt=5.*"

platform:
-x64

install:
- C:\Python27\python -u scripts\install-qt.py
- C:\Python27\python -m pip install tox

cache:
- C:\Installers -> appveyor.yml, scripts\install-qt.py

build: false # Not a C# project
# If there is a newer build queued for the same PR, cancel this one.
# The AppVeyor 'rollout builds' option is supposed to serve the same
# purpose but it is problematic because it tends to cancel builds pushed
# directly to master instead of just PR builds (or the converse).
# credits: JuliaLang developers.
- ps: if ($env:APPVEYOR_PULL_REQUEST_NUMBER -and $env:APPVEYOR_BUILD_NUMBER -ne ((Invoke-RestMethod `
https://ci.appveyor.com/api/projects/$env:APPVEYOR_ACCOUNT_NAME/$env:APPVEYOR_PROJECT_SLUG/history?recordsNumber=50).builds | `
Where-Object pullRequestId -eq $env:APPVEYOR_PULL_REQUEST_NUMBER)[0].buildNumber) { `
throw "There are newer queued builds for this pull request, failing early." }
- "git clone --depth 1 git://github.com/astropy/ci-helpers.git"
- "powershell ci-helpers/appveyor/install-miniconda.ps1"
- "SET PATH=%PYTHON%;%PYTHON%\\Scripts;%PATH%"
- "activate test"
- "pip install -e ."

# Not a .NET project, we build in the install step instead
build: false

test_script:
- C:\Python27\scripts\tox -e %TESTENVS%
- "%CMD_IN_ENV% python -m pytest tests/"
88 changes: 0 additions & 88 deletions scripts/install-qt.py

This file was deleted.