Skip to content

Commit

Permalink
Testing: Simplify testing on CircleCI
Browse files Browse the repository at this point in the history
  • Loading branch information
ccordoba12 committed May 5, 2017
1 parent 1865ddd commit b7f34eb
Show file tree
Hide file tree
Showing 4 changed files with 63 additions and 11 deletions.
19 changes: 19 additions & 0 deletions ci/test-pyqt4.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
#!/bin/bash

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

# We use container 3 to test with pip and pyqt5
if [ "$CIRCLE_NODE_INDEX" = "3" ]; then
exit 0
else
conda remove -q qt pyqt
conda install -q qt=4.* pyqt=4.*
fi

python qtpy/tests/runtests.py

# Force quitting if exit status of runtests.py was not 0
if [ $? -ne 0 ]; then
exit 1
fi
18 changes: 18 additions & 0 deletions ci/test-pyqt5.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
#!/bin/bash

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

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

python qtpy/tests/runtests.py

# Force quitting if exit status of runtests.py was not 0
if [ $? -ne 0 ]; then
exit 1
fi
19 changes: 19 additions & 0 deletions ci/test-pyside.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
#!/bin/bash

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

# We use container 3 to test with pip and pyqt5
if [ "$CIRCLE_NODE_INDEX" = "3" ]; then
exit 0
else
conda remove -q qt pyqt
conda install -q -c conda-forge qt=4.* pyside
fi

python qtpy/tests/runtests.py

# Force quitting if exit status of runtests.py was not 0
if [ $? -ne 0 ]; then
exit 1
fi
18 changes: 7 additions & 11 deletions circle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ machine:
# Used by test scripts
TEST_CI: "True"
# Python versions to test (Maximum of 4 different versions for now)
PY_VERSIONS: "2.7 3.5 3.6"
PY_VERSIONS: "2.7 3.5 3.6 3.5"
# For Coveralls
COVERALLS_REPO_TOKEN: xh75EzxFFMoTEyNPo3wXxXv8OVkul3eE5
# Used by astropy-ci helpers
Expand All @@ -27,17 +27,13 @@ dependencies:

test:
override:
# Check PyQt5
- export PATH="$HOME/miniconda/bin:$PATH" && source activate test && conda install -q qt=5.* pyqt=5.* && python qtpy/tests/runtests.py: # note the colon
- ./ci/test-pyqt5.sh: # note the colon
parallel: true
# Check PySide2
# - export PATH="$HOME/miniconda/bin:$PATH" && source activate test && conda install -q qt=5.* pyside2 && python qtpy/tests/runtests.py: # note the colon
# parallel: true
# Check PyQt4
- export PATH="$HOME/miniconda/bin:$PATH" && source activate test && conda install -q qt=4.* pyqt=4.* && python qtpy/tests/runtests.py: # note the colon
# - ./ci/test-pyside2.sh: # note the colon
# parallel: true
- ./ci/test-pyqt4.sh: # note the colon
parallel: true
- export PATH="$HOME/miniconda/bin:$PATH" && source activate test && coveralls: # note the colon
- ./ci/test-pyside.sh: # note the colon
parallel: true
# Check Pyside
- export PATH="$HOME/miniconda/bin:$PATH" && source activate test && conda remove -q qt pyqt && conda install -c conda-forge qt=4.* pyside && python qtpy/tests/runtests.py: # note the colon
- export PATH="$HOME/miniconda/bin:$PATH" && source activate test && coveralls: # note the colon
parallel: true

0 comments on commit b7f34eb

Please sign in to comment.