Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
tacaswell merged 21 commits intomasterfromazure-pipelines
Nov 2, 2018
Merged
Show file tree
Hide file tree
Changes fromall commits
Commits
Show all changes
21 commits
Select commitHold shift + click to select a range
bc43abd
Set up CI with Azure Pipelines
azure-pipelines[bot]Oct 24, 2018
52cb05b
Update azure-pipelines.yml
tacaswellOct 24, 2018
a4fd1c2
TST: make sure all figures are closed before testing show
tacaswellOct 25, 2018
7b7d2ba
CI: update how dependencies are installed
tacaswellOct 25, 2018
c363e1f
CI: start xserver
tacaswellOct 25, 2018
6909ec5
CI: remove all of the GUI installation again
tacaswellNov 1, 2018
c7ec9d1
TST: open temporary file as text (not binary)
tacaswellNov 2, 2018
1d04409
TST: add missing import
tacaswellNov 2, 2018
67932e9
TST: use localfreetype on azure
tacaswellNov 2, 2018
0b6ce91
TST: tweak imports in test script + add check for server up
tacaswellNov 2, 2018
1753f6b
TST: move over all flags from travis invocation of pytest
tacaswellNov 2, 2018
11ac939
TST: add debugging prints
tacaswellNov 2, 2018
ba46ce4
TST: skip some tests on azure
tacaswellNov 2, 2018
b55fdf9
TST: more debugging prints
tacaswellNov 2, 2018
ad0e579
TST: skip tests based on user name?
tacaswellNov 2, 2018
f8376eb
CI: print env right before testing
tacaswellNov 2, 2018
729c3bd
TST: print out the full environment
tacaswellNov 2, 2018
309fdf0
CI: have I finally found a way to identify we are on azure?!
tacaswellNov 2, 2018
744e7fa
CI: Debugging prints to sort out how to make it skip
tacaswellNov 2, 2018
0c07d96
TST: pytest marks work better if you use them a decorators 🐑
tacaswellNov 2, 2018
b100da4
TST: provide reasons for skipping tests
tacaswellNov 2, 2018
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
53 changes: 53 additions & 0 deletionsazure-pipelines.yml
View file
Open in desktop
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
# 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

displayName: 'Install dependencies'

- script: |

export MPLLOCALFREETYPE=1
pip install -ve .

displayName: "Install self"

- script: env
displayName: 'print env'

- script: |
env
pytest --junitxml=junit/test-results.xml -raR --maxfail=50 --timeout=300 --durations=25 --cov-report= --cov=lib -n 2
displayName: 'pytest'

- task: PublishTestResults@2
inputs:
testResultsFiles: '**/test-results.xml'
testRunTitle: 'Python $(python.version)'
condition: succeededOrFailed()
5 changes: 4 additions & 1 deletionlib/matplotlib/tests/test_backend_bases.py
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -3,7 +3,7 @@
import matplotlib.pyplot as plt
import matplotlib.transforms as transforms
import matplotlib.path as path

import os
import numpy as np
import pytest

Expand DownExpand Up@@ -56,8 +56,11 @@ def test_get_default_filename(tmpdir):


@pytest.mark.backend('pdf')
@pytest.mark.skipif('SYSTEM_TEAMFOUNDATIONCOLLECTIONURI' in os.environ,
reason="this test fails an azure for unknown reasons")
def test_non_gui_warning():
plt.subplots()

with pytest.warns(UserWarning) as rec:
plt.show()
assert len(rec) == 1
Expand Down
3 changes: 2 additions & 1 deletionlib/matplotlib/tests/test_backend_nbagg.py
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -13,7 +13,8 @@ def _notebook_run(nb_file):
"""Execute a notebook via nbconvert and collect output.
:returns (parsed nb object, execution errors)
"""
with tempfile.NamedTemporaryFile(suffix=".ipynb") as fout:
with tempfile.NamedTemporaryFile(suffix=".ipynb",
mode='w+t') as fout:
args = ["jupyter", "nbconvert", "--to", "notebook", "--execute",
"--ExecutePreprocessor.timeout=500",
"--output", fout.name, nb_file]
Expand Down
7 changes: 7 additions & 0 deletionslib/matplotlib/tests/test_backends_interactive.py
View file
Open in desktop
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
import importlib
import importlib.util
import os
import signal
import subprocess
Expand DownExpand Up@@ -46,6 +47,7 @@ def _get_testable_interactive_backends():
# we directly invoke it from the superclass instead.
_test_script = """\
import importlib
import importlib.util
import sys
from unittest import TestCase

Expand DownExpand Up@@ -115,6 +117,8 @@ def test_interactive_backend(backend):
pytest.fail("The subprocess returned an error.")


@pytest.mark.skipif('SYSTEM_TEAMFOUNDATIONCOLLECTIONURI' in os.environ,
reason="this test fails an azure for unknown reasons")
@pytest.mark.skipif(os.name == "nt", reason="Cannot send SIGINT on Windows.")
def test_webagg():
pytest.importorskip("tornado")
Expand All@@ -125,6 +129,9 @@ def test_webagg():
timeout = time.perf_counter() + _test_timeout
while True:
try:
retcode = proc.poll()
# check that the subprocess for the server is not dead
assert retcode is None
conn = urllib.request.urlopen(url)
break
except urllib.error.URLError:
Expand Down

[8]ページ先頭

©2009-2025 Movatter.jp