8000 Set up CI with Azure Pipelines by azure-pipelines[bot] · Pull Request #12617 · matplotlib/matplotlib · GitHub
[go: up one dir, main page]

Skip to content

Set up CI with Azure Pipelines #12617

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

Merged
merged 21 commits into from
Nov 2, 2018
Merged
Show file tree
Hide file tree
Changes from 5 commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
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
8000
71 changes: 71 additions & 0 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
# Python package
# Create and test a Python package on multiple Python versions.
# Add steps that analyze code, save the dist with the build record, publish to a PyPI-compatible index, and more:
# https://docs.microsoft.com/azure/devops/pipelines/languages/python

jobs:

- job: 'Test'
pool:
vmImage: 'Ubuntu 16.04'
strategy:
matrix:
Python35:
python.version: '3.5'
Python36:
python.version: '3.6'
Python37:
python.version: '3.7'
maxParallel: 4

steps:
- task: UsePythonVersion@0
inputs:
versionSpec: '$(python.version)'
architecture: 'x64'

- script: |

python -m pip install --upgrade pip
pip install -r requirements/testing/travis_all.txt -r requirements/testing/travis36.txt
# GUI toolkits are pip-installable only for some versions of Python so
# don't fail if we can't install them. Make it easier to check whether the
# install was successful by trying to import the toolkit (sometimes, the
# install appears to be successful but shared libraries cannot be loaded at
# runtime, so an actual import is a better check).
python -mpip install --upgrade cairocffi>=0.8 pgi>=0.0.11.2 &&
python -c 'import pgi as gi; gi.require_version("Gtk", "3.0"); from pgi.repository import Gtk' &&
echo 'pgi is available' ||
echo 'pgi is not available'
python -mpip install --upgrade pyqt5 &&
python -c 'import PyQt5.QtCore' &&
echo 'PyQt5 is available' ||
echo 'PyQt5 is not available'
python -mpip install --upgrade \
-f https://extras.wxpython.org/wxPython4/extras/linux/gtk3/ubuntu-14.04 \
wxPython &&
python -c 'import wx' &&
echo 'wxPython is available' ||
echo 'wxPython is not available'

displayName: 'Install dependencies'
- script: |

export DISPLAY=:99.0
sh -e /etc/init.d/xvfb start
displayName: 'start x server'

- script: pip install -ve .
displayName: "Install self"

- script: |

pip install pytest
pytest --junitxml=junit/test-results.xml
displayName: 'pytest'

- task: PublishTestResults@2
inputs:
testResultsFiles: '**/test-results.xml'
testRunTitle: 'Python $(python.version)'
condition: succeededOrFailed()
1 change: 1 addition & 0 deletions lib/matplotlib/tests/test_backend_bases.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ def test_get_default_filename(tmpdir):

@pytest.mark.backend('pdf')
def test_non_gui_warning():
plt.close('all')
plt.subplots()
with pytest.warns(UserWarning) as rec:
plt.show()
Expand Down
0