Skip to content

Commit

Permalink
Testing: Simplify Circle testing and move coveralls to Travis
Browse files Browse the repository at this point in the history
  • Loading branch information
ccordoba12 committed May 22, 2017
1 parent a450dae commit 7c8a5b3
Show file tree
Hide file tree
Showing 5 changed files with 29 additions and 70 deletions.
6 changes: 4 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,7 @@ matrix:
- python: "3.5"
env: TEST_MODULES=true USE_PYQT=pyqt4
os: linux
# This slot test runs our tests only with pip
# packages
# This slot runs our tests only with pip packages
- python: "3.5"
env: TEST_MODULES=false USE_PYQT=pyqt5
os: linux
Expand All @@ -42,3 +41,6 @@ script:
./continuous_integration/travis/test-qt4.sh
fi
fi
after_sucess:
- coveralls
10 changes: 3 additions & 7 deletions circle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,7 @@
machine:
environment:
# Python versions to tests (Maximum of 4 different versions)
# 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
PY_VERSIONS: "3.5 3.6"
# Environment variable used by astropy helpers
TRAVIS_OS_NAME: "linux"

Expand All @@ -17,7 +13,7 @@ dependencies:
# See https://github.com/TestFX/TestFX/issues/158#issuecomment-62421691
- sudo apt-get install matchbox-window-manager
override:
- ./continuous_integration/install.sh
- ./continuous_integration/circle/install.sh
- DISPLAY=:99 /usr/bin/matchbox-window-manager:
background: true
- sleep 5
Expand All @@ -28,5 +24,5 @@ test:
#- export PATH="$HOME/miniconda/bin:$PATH" && source activate test && ciocheck spyder: # note the colon
# parallel: true
# PyQt5
- ./continuous_integration/circle/test-qt5.sh || ./continuous_integration/circle/test-qt5.sh || ./continuous_integration/circle/test-qt5.sh: # note the colon
- ./continuous_integration/circle/test-qt5.sh || ./continuous_integration/circle/test-qt5.sh: # note the colon
parallel: true
21 changes: 21 additions & 0 deletions continuous_integration/circle/install.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
#!/bin/bash

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"
export PIP_DEPENDENCIES="coveralls pytest-qt pytest-xvfb flaky jedi pycodestyle"

# 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 ciocheck (not working right now)
#conda install -q ciocheck -c spyder-ide --no-update-deps
25 changes: 1 addition & 24 deletions continuous_integration/circle/test-qt5.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,29 +3,6 @@
export PATH="$HOME/miniconda/bin:$PATH"
source activate test

# We use container 3 to test with pip
if [ "$CIRCLE_NODE_INDEX" = "0" ]; then
# Skip Python 2.7 for now because it's failing frequently
# and randomly at different places.
exit 0
elif [ "$CIRCLE_NODE_INDEX" != "3" ]; then
conda install -q qt=5.* pyqt=5.* qtconsole matplotlib
else
pip install -q pyqt5
fi
conda install -q qt=5.* pyqt=5.* qtconsole matplotlib

python runtests.py

# Force quitting if exit status of runtests.py was not 0
if [ $? -ne 0 ]; then
exit 1
fi

# Run coveralls also here because there are errors if run
# as an independent command
coveralls

# Don't stop if coveralls fails for whatever reason
if [ $? -ne 0 ]; then
exit 0
fi
37 changes: 0 additions & 37 deletions continuous_integration/install.sh

This file was deleted.

0 comments on commit 7c8a5b3

Please sign in to comment.