Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PR: Run our tests with PyQt5 wheels on CircleCI #4249

Merged
merged 2 commits into from
Mar 12, 2017
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
22 changes: 5 additions & 17 deletions circle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,33 +3,21 @@
machine:
environment:
# Python versions to tests (Maximum of 4 different versions)
PY_VERSIONS: "2.7 3.5 3.6"
# The last container is reserved to test with PyQt5 wheels
# because they are more up to date than conda páckages.
PY_VERSIONS: "2.7 3.5 3.6 3.5"
# For Coveralls
COVERALLS_REPO_TOKEN: yt7YToGxRtnAcM6kSULoiCmOPetq10TaU
# Environment variables used by astropy helpers
# Environment variable used by astropy helpers
TRAVIS_OS_NAME: "linux"
CONDA_DEPENDENCIES_FLAGS: "--quiet"
CONDA_DEPENDENCIES: >
rope jedi pyflakes sphinx pygments pylint pep8 psutil nbconvert qtawesome pickleshare
qtpy pyzmq chardet mock nomkl pandas pytest pytest-cov numpydoc scipy
PIP_DEPENDENCIES: "coveralls pytest-qt flaky"

dependencies:
pre:
# We need to run a window manager to avoid focus problems when running our tests.
# See https://github.com/TestFX/TestFX/issues/158#issuecomment-62421691
- sudo apt-get install matchbox-window-manager
override:
# First convert PY_VERSIONS to an array and then select the python version based on the CIRCLE_NODE_INDEX
- export PY_VERSIONS=($PY_VERSIONS) &&
export TRAVIS_PYTHON_VERSION=${PY_VERSIONS[$CIRCLE_NODE_INDEX]} &&
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 &&
conda install -q ciocheck -c spyder-ide --no-update-deps &&
python setup.py install > /dev/null;
- ./continuous_integration/circle/install.sh
- DISPLAY=:99 /usr/bin/matchbox-window-manager:
background: true
- sleep 5
Expand Down
34 changes: 34 additions & 0 deletions continuous_integration/circle/install.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
#!/bin/bash

# We use container 3 to run our tests with pip packages
if [ "$CIRCLE_NODE_INDEX" = "3" ]; then
export PIP_DEPENDENCIES_FLAGS="-q"
export PIP_DEPENDENCIES="pyqt5 coveralls"
export CONDA_DEPENDENCIES=""
else
export CONDA_DEPENDENCIES_FLAGS="--quiet"
export CONDA_DEPENDENCIES="rope jedi pyflakes sphinx pygments pylint pep8 psutil nbconvert \
qtawesome pickleshare qtpy pyzmq chardet mock nomkl pandas \
pytest pytest-cov numpydoc scipy"
export PIP_DEPENDENCIES="coveralls pytest-qt flaky"
fi


# Download and install miniconda and conda/pip dependencies
# with astropy helpers
export PY_VERSIONS=($PY_VERSIONS)
export TRAVIS_PYTHON_VERSION=${PY_VERSIONS[$CIRCLE_NODE_INDEX]}
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


# Install Spyder
if [ "$CIRCLE_NODE_INDEX" = "3" ]; then
pip install -e .[test] > /dev/null
else
conda install -q ciocheck -c spyder-ide --no-update-deps
python setup.py install > /dev/null
fi
11 changes: 8 additions & 3 deletions continuous_integration/circle/test-qt4.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,14 @@ source activate test
export PY_VERSIONS=($PY_VERSIONS)
export PY_VERSION=${PY_VERSIONS[$CIRCLE_NODE_INDEX]}

if [ "$PY_VERSION" = "2.7" ] || [ "$PY_VERSION" = "3.5" ]; then
conda install -q qt=4.* pyqt=4.*
python runtests.py
# We use container 3 to test with pip
if [ "$CIRCLE_NODE_INDEX" != "3" ]; then
if [ "$PY_VERSION" = "2.7" ] || [ "$PY_VERSION" = "3.5" ]; then
conda install -q qt=4.* pyqt=4.*
python runtests.py
else
exit 0
fi
else
exit 0
fi
6 changes: 4 additions & 2 deletions continuous_integration/circle/test-qt5.sh
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
#!/bin/bash

export PATH="$HOME/miniconda/bin:$PATH"

source activate test

conda install -q qt=5.* pyqt=5.* qtconsole matplotlib
# We use container 3 to test with pip
if [ "$CIRCLE_NODE_INDEX" != "3" ]; then
conda install -q qt=5.* pyqt=5.* qtconsole matplotlib
fi

python runtests.py

Expand Down