diff --git a/circle.yml b/circle.yml index 0a99d410e0b..84b3096f72b 100644 --- a/circle.yml +++ b/circle.yml @@ -3,16 +3,13 @@ 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: @@ -20,16 +17,7 @@ dependencies: # 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 diff --git a/continuous_integration/circle/install.sh b/continuous_integration/circle/install.sh new file mode 100755 index 00000000000..cb2f3970399 --- /dev/null +++ b/continuous_integration/circle/install.sh @@ -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 diff --git a/continuous_integration/circle/test-qt4.sh b/continuous_integration/circle/test-qt4.sh index a6643e1b28a..c3ac9302f3b 100755 --- a/continuous_integration/circle/test-qt4.sh +++ b/continuous_integration/circle/test-qt4.sh @@ -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 diff --git a/continuous_integration/circle/test-qt5.sh b/continuous_integration/circle/test-qt5.sh index d66b8a9b2f9..7252b6eb75f 100755 --- a/continuous_integration/circle/test-qt5.sh +++ b/continuous_integration/circle/test-qt5.sh @@ -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