Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ci] run all python-guide examples at Appveyor side #1432

Merged
merged 1 commit into from
Jun 9, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 11 additions & 3 deletions .appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ clone_depth: 50

install:
- git submodule update --init --recursive # get `compute` folder
- set PATH=%PATH:C:\Program Files\Git\usr\bin;=% # Delete sh.exe from PATH (mingw32-make fix)
- set PATH=%PATH:C:\Program Files\Git\usr\bin;=% # delete sh.exe from PATH (mingw32-make fix)
- set PATH=C:\mingw-w64\x86_64-6.3.0-posix-seh-rt_v5-rev1\mingw64\bin;%PATH%
- set PYTHON_VERSION=%CONFIGURATION%
- ps: >-
Expand All @@ -30,7 +30,7 @@ install:
- ps: $env:LGB_VER = (Get-Content VERSION.txt).trim()
- conda config --set always_yes yes --set changeps1 no
- conda update -q conda
- conda create -q -n test-env python=%PYTHON_VERSION% numpy nose scipy scikit-learn pandas matplotlib pytest
- conda create -q -n test-env python=%PYTHON_VERSION% numpy nose scipy scikit-learn pandas matplotlib python-graphviz pytest
- activate test-env

build_script:
Expand All @@ -48,8 +48,16 @@ test_script:
pip install lightgbm-%LGB_VER%.tar.gz -v)
- cd ../..
- pytest tests/python_package_test
- cd examples/python-guide
- ps: >-
@("import matplotlib", "matplotlib.use('Agg')") +�(Get-Content "plot_example.py") | Set-Content�"plot_example.py" # prevent interactive window mode
- ps: >-
foreach ($file in @(Get-ChildItem *.py)) {
python $file
if ($LastExitCode -ne 0) { $host.SetShouldExit($LastExitCode) }
} # run all examples
- IF "%COMPILER%"=="MINGW" appveyor exit # skip all further steps
- cd python-package && python setup.py bdist_wheel --plat-name=win-amd64 --universal
- cd ../../python-package && python setup.py bdist_wheel --plat-name=win-amd64 --universal

after_test:
- cd ../.nuget
Expand Down