Skip to content

Commit

Permalink
Testing: Move tests with PyQt 5.8 to Travis
Browse files Browse the repository at this point in the history
  • Loading branch information
ccordoba12 committed May 22, 2017
1 parent e301897 commit dad9a08
Show file tree
Hide file tree
Showing 4 changed files with 56 additions and 8 deletions.
18 changes: 11 additions & 7 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,29 +11,33 @@ matrix:
# env: TEST_MODULES=false
# os: linux
- python: "2.7"
env: TEST_MODULES=true
env: TEST_MODULES=true USE_PYQT=pyqt4
os: linux
- python: "3.5"
env: TEST_MODULES=false
env: TEST_MODULES=false USE_PYQT=pyqt4
os: linux
- python: "3.5"
env: TEST_MODULES=true
env: TEST_MODULES=true USE_PYQT=pyqt4
os: linux
- python: "3.4"
env: TEST_MODULES=false
- python: "3.5"
env: TEST_MODULES=false USE_PYQT=pyqt5
os: linux

before_install:
- "export DISPLAY=:99.0"
- "sh -e /etc/init.d/xvfb start"

install:
- ./continuous_integration/install.sh;
- ./continuous_integration/travis/install.sh;

script:
- |
if [ "$TEST_MODULES" = "true" ]; then
./continuous_integration/travis/modules_test.sh
else
./continuous_integration/travis/test-qt4.sh
if [ "$USE_PYQT" = "pyqt5" ]; then
./continuous_integration/travis/test-qt5.sh
else
./continuous_integration/travis/test-qt4.sh
fi
fi
29 changes: 29 additions & 0 deletions continuous_integration/travis/install.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
#!/bin/bash

# We test with pip packages in Python 3.5 and PyQt5
if [ "$TRAVIS_PYTHON_VERSION" = "3.5" ] && [ "$USE_PYQT" = "pyqt5" ]; then
export PIP_DEPENDENCIES_FLAGS="-q"
export PIP_DEPENDENCIES="coveralls"
export CONDA_DEPENDENCIES=""
else
export CONDA_DEPENDENCIES_FLAGS="--quiet"
export CONDA_DEPENDENCIES="rope pyflakes sphinx pygments pylint psutil nbconvert \
qtawesome pickleshare qtpy pyzmq chardet mock nomkl pandas \
pytest pytest-cov numpydoc scipy cython pillow jedi pycodestyle"
export PIP_DEPENDENCIES="coveralls pytest-qt flaky"
fi


# Download and install miniconda and conda/pip dependencies
# with astropy helpers
echo -e "PYTHON = $TRAVIS_PYTHON_VERSION \n============"
git clone git://github.com/astropy/ci-helpers.git > /dev/null
source ci-helpers/travis/setup_conda_$TRAVIS_OS_NAME.sh
export PATH="$HOME/miniconda/bin:$PATH"
source activate test


# We test with pip packages in Python 3.5 and PyQt5
if [ "$TRAVIS_PYTHON_VERSION" = "3.5" ] && [ "$USE_PYQT" = "pyqt5" ]; then
pip install -q -e .[test]
fi
8 changes: 7 additions & 1 deletion continuous_integration/travis/modules_test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,13 @@ export PYTHONPATH=.
export PATH="$HOME/miniconda/bin:$PATH"
source activate test

conda install -q qt=4.* pyqt=4.* qtconsole matplotlib

if [ "$USE_PYQT" = "pyqt5" ]; then
conda install -q qt=5.* pyqt=5.* qtconsole matplotlib
else
conda install -q qt=4.* pyqt=4.* qtconsole matplotlib
fi


# Depth 1
for f in spyder/*.py; do
Expand Down
9 changes: 9 additions & 0 deletions continuous_integration/travis/test-qt5.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#!/bin/bash

export PATH="$HOME/miniconda/bin:$PATH"
source activate test

pip uninstall -q -y pytest-xvfb
conda install -q qt=5.* pyqt=5.* qtconsole matplotlib

python runtests.py

0 comments on commit dad9a08

Please sign in to comment.