-
-
Notifications
You must be signed in to change notification settings - Fork 7.9k
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
Changes from 5 commits
Commits
Show all changes
21 commits
Select commit
Hold shift + click to select a range
bc43abd
Set up CI with Azure Pipelines
azure-pipelines[bot] 52cb05b
Update azure-pipelines.yml
tacaswell a4fd1c2
TST: make sure all figures are closed before testing show
tacaswell 7b7d2ba
CI: update how dependencies are installed
tacaswell c363e1f
CI: start xserver
tacaswell 6909ec5
CI: remove all of the GUI installation again
tacaswell c7ec9d1
TST: open temporary file as text (not binary)
tacaswell 1d04409
TST: add missing import
tacaswell 67932e9
TST: use localfreetype on azure
tacaswell 0b6ce91
TST: tweak imports in test script + add check for server up
tacaswell 1753f6b
TST: move over all flags from travis invocation of pytest
tacaswell 11ac939
TST: add debugging prints
tacaswell ba46ce4
TST: skip some tests on azure
tacaswell b55fdf9
TST: more debugging prints
tacaswell ad0e579
TST: skip tests based on user name?
tacaswell f8376eb
CI: print env right before testing
tacaswell 729c3bd
TST: print out the full environment
tacaswell 309fdf0
CI: have I finally found a way to identify we are on azure?!
tacaswell 744e7fa
CI: Debugging prints to sort out how to make it skip
tacaswell 0c07d96
TST: pytest marks work better if you use them a decorators 🐑
tacaswell b100da4
TST: provide reasons for skipping tests
tacaswell File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.