Skip to content

Commit

Permalink
Fix CI test
Browse files Browse the repository at this point in the history
run examples from examples directory
  • Loading branch information
Mbompr authored and PhilipDeegan committed Mar 5, 2019
1 parent e432a0f commit 6106e05
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 4 deletions.
3 changes: 3 additions & 0 deletions tools/travis/docker_run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@ eval "$(pyenv init -)"
pyenv global ${PYVER}
pyenv local ${PYVER}

PYMAJ=$(python -c "import sys; print(sys.version_info[0])")
PYMIN=$(python -c "import sys; print(sys.version_info[1])")

if (( PYMAJ == 3 )) && (( PYMIN == 7 )); then
echo "Skipping installing only needed for doctest which are not run on Python 3.7 (see bellow)"
else
Expand Down
4 changes: 2 additions & 2 deletions tools/travis/osx_install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ else
brew install geos
fi
# needed for basemap see https://github.com/matplotlib/basemap/issues/414#issuecomment-436792915
python -m pip install https://github.com/jswhit/pyproj/archive/v1.9.5.1rel.zip
python -m pip install https://github.com/matplotlib/basemap/archive/v1.1.0.tar.gz
# python -m pip install https://github.com/jswhit/pyproj/archive/v1.9.5.1rel.zip
python -m pip install https://github.com/matplotlib/basemap/archive/v1.2.0rel.tar.gz
pyenv rehash

9 changes: 7 additions & 2 deletions tools/travis/osx_run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

set -e -x

CWD="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
cd $CWD/../..
ROOT=$PWD
cd $CWD
shell_session_update() { :; }

eval "$(pyenv init -)"
Expand All @@ -25,9 +29,10 @@ set -e
python setup.py build_ext --inplace cpptest pytest

export PYTHONPATH=${PYTHONPATH}:`pwd`
for f in $(find examples -maxdepth 1 -type f -name "*.py"); do
cd $ROOT/examples
for f in $(find . -maxdepth 1 -type f -name "*.py"); do
FILE=$(basename $f)
FILE="${FILE%.*}" # skipping it takes too long
[[ "plot_asynchronous_stochastic_solver" != "$FILE" ]] && \
DISPLAY="-1" python -c "import tick.base; import examples.$FILE"
DISPLAY="-1" python -c "import tick.base; import $FILE"
done

0 comments on commit 6106e05

Please sign in to comment.