Skip to content

Commit

Permalink
run all python examples at CI side (#1422)
Browse files Browse the repository at this point in the history
  • Loading branch information
StrikerRUS committed Jun 6, 2018
1 parent 0a9d4cc commit d7eb6e3
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion .travis/test.sh
Expand Up @@ -114,5 +114,11 @@ cd $TRAVIS_BUILD_DIR/python-package && python setup.py install --precompile || e
cd $TRAVIS_BUILD_DIR && pytest . || exit -1

if [[ ${TASK} == "regular" ]]; then
cd $TRAVIS_BUILD_DIR/examples/python-guide && python simple_example.py && python sklearn_example.py && python advanced_example.py || exit -1
conda install python-graphviz
cd $TRAVIS_BUILD_DIR/examples/python-guide
sed -i'.bak' '/import lightgbm as lgb/a\
import matplotlib\
matplotlib.use\(\"Agg\"\)\
' plot_example.py # prevent interactive window mode
for f in *.py; do python $f || exit -1; done # run all examples
fi

0 comments on commit d7eb6e3

Please sign in to comment.