[ci] run example jupyter notebooks as part of tests at the CI side (#1807)

* execute notebooks on CIs

* run notebooks in interactive mode and increase timeout for MinGW

* hotfix alphabetically sort packages installation
This commit is contained in:
Nikita Titov 2018-11-05 10:49:54 +03:00 коммит произвёл Guolin Ke
Родитель 5d46771acd
Коммит 5c8e365fe5
3 изменённых файлов: 9 добавлений и 0 удалений

Просмотреть файл

@ -52,3 +52,6 @@ test_script:
python $file
if ($LastExitCode -ne 0) { $host.SetShouldExit($LastExitCode) }
} # run all examples
- cd %APPVEYOR_BUILD_FOLDER%\examples\python-guide\notebooks
- conda install -y -n test-env ipywidgets notebook
- jupyter nbconvert --ExecutePreprocessor.timeout=180 --to notebook --execute --inplace *.ipynb # run all notebooks

Просмотреть файл

@ -145,4 +145,7 @@ matplotlib.use\(\"Agg\"\)\
' plot_example.py # prevent interactive window mode
sed -i'.bak' 's/graph.render(view=True)/graph.render(view=False)/' plot_example.py
for f in *.py; do python $f || exit -1; done # run all examples
cd $BUILD_DIRECTORY/examples/python-guide/notebooks
conda install -y -n $CONDA_ENV ipywidgets notebook
jupyter nbconvert --ExecutePreprocessor.timeout=180 --to notebook --execute --inplace *.ipynb || exit -1 # run all notebooks
fi

Просмотреть файл

@ -36,4 +36,7 @@ if ($env:TASK -eq "regular") {
foreach ($file in @(Get-ChildItem *.py)) {
python $file ; Check-Output $LastExitCode
} # run all examples
cd $env:BUILD_SOURCESDIRECTORY/examples/python-guide/notebooks
conda install -y -n $env:CONDA_ENV ipywidgets notebook
jupyter nbconvert --ExecutePreprocessor.timeout=180 --to notebook --execute --inplace *.ipynb ; Check-Output $LastExitCode # run all notebooks
}