зеркало из https://github.com/microsoft/LightGBM.git
[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:
Родитель
5d46771acd
Коммит
5c8e365fe5
|
@ -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
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче