Skip to content

Commit 3b37124

Browse files
committed
CI automatically test examples
1 parent e9d394c commit 3b37124

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

.travis.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@ matrix:
1717
env: DISTRIB="conda" PYTHON_VERSION="3.5" COVERAGE="true" MINICONDA_URL="https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh"
1818
- os: linux
1919
env: DISTRIB="conda" PYTHON_VERSION="3.6" MINICONDA_URL="https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh"
20+
- os: linux
21+
env: DISTRIB="conda" PYTHON_VERSION="3.6" EXAMPLES="true" MINICONDA_URL="https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh"
2022

2123
# Temporarily disabling OSX builds because thy take too long
2224
# Set language to generic to not break travis-ci

ci_scripts/test.sh

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,18 @@ set -e
55
mkdir -p $TEST_DIR
66

77
cwd=`pwd`
8+
examples_dir=$pwd/example
89
test_dir=$cwd/test/
910

1011
cd $TEST_DIR
1112

1213
if [[ "$COVERAGE" == "true" ]]; then
1314
nosetests --no-path-adjustment -sv --with-coverage --cover-package=$MODULE $test_dir
15+
elif [[ "$EXAMPLES" == "true" ]]; then
16+
for example in `find $examples_dir -name '*.py'`
17+
do
18+
python $example
19+
done
1420
else
1521
nosetests --no-path-adjustment -sv $test_dir
1622
fi

0 commit comments

Comments
 (0)