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
48 changes: 20 additions & 28 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,24 +1,16 @@
language: python
language: generic
sudo: required
dist: trusty

python:
- "2.7"
- "3.4"

virtualenv:
system_site_packages: true

matrix:
exclude:
- env: PYTEST_QT_API=pyqt5
python: "2.7"

env:
- PYTEST_QT_API=pyqt4
- PYTEST_QT_API=pyqt4v2
- PYTEST_QT_API=pyside
- PYTEST_QT_API=pyqt5
- PYTEST_QT_API=pyqt4 PYTHON=python2.7
- PYTEST_QT_API=pyqt4v2 PYTHON=python2.7
- PYTEST_QT_API=pyside PYTHON=python2.7

- 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

install:
- sudo apt-get update
Expand All @@ -27,28 +19,28 @@ install:
- sudo apt-get install -y xvfb herbstluftwm

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

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

# Tox
- pip install -U tox
# Dependencies
- sudo $PYTHON -m pip install -U pytest tox coveralls

# others
- pip install coveralls --use-wheel
# pytest-qt
- sudo $PYTHON setup.py develop

before_script:
- "export DISPLAY=:99.0"
- "sh -e /etc/init.d/xvfb start"
- 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:
- python setup.py develop
- catchsegv coverage run --source=pytestqt setup.py test
- tox -e lint
- sudo catchsegv coverage run --source=pytestqt setup.py test
- sudo tox -e lint
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do those need sudo?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

setuptools (or distutils) would complain about not being able to write some files somewhere, I don't remember where exactly... TBH I didn't investigate it too much. 😅


after_success:
- coveralls
Expand Down
2 changes: 1 addition & 1 deletion tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ setenv=
passenv=DISPLAY XAUTHORITY USER USERNAME

[testenv:lint]
basepython=python3.5
basepython=python3.4
deps=
pytest
sphinx
Expand Down