From e8d838a55176d03e276938f98148b90c6d7a2f4d Mon Sep 17 00:00:00 2001 From: Matt Cooper Date: Sat, 4 May 2019 15:48:17 -0400 Subject: [PATCH] add test output and a run against Python RC --- .azure-pipelines.yml | 115 ++++++++++++++++++++++++++----------------- tox.ini | 2 +- 2 files changed, 71 insertions(+), 46 deletions(-) diff --git a/.azure-pipelines.yml b/.azure-pipelines.yml index 6ba0a4d2..5a4910ee 100644 --- a/.azure-pipelines.yml +++ b/.azure-pipelines.yml @@ -1,53 +1,78 @@ trigger: -- master +- 'master' +- '*-maintenance' -variables: - vmImage: ubuntu-latest - python.version: '3.7' - TOXENV: 'py,codecov' - python.architecture: 'x64' +jobs: +- job: Flask + variables: + vmImage: ubuntu-latest + python.version: '3.7' + TOXENV: 'py,codecov' + python.architecture: 'x64' + publish.test.results: 'true' -strategy: - matrix: - Python37Linux: - python.version: '3.7' - Python37Windows: - python.version: '3.7' - vmImage: 'windows-latest' - Python37Mac: - python.version: '3.7' - vmImage: 'macos-latest' - Pypy3Linux: - python.version: 'pypy3' - Python36Linux: - python.version: '3.6' - Python35Linux: - python.version: '3.5' - Python27Linux: - python.version: '2.7' - Python27Windows: - python.version: '2.7' - vmImage: 'windows-latest' - DocsHtml: - TOXENV: docs-html - VersionRange: - TOXENV: devel,lowest,codecov + strategy: + matrix: + Python37Linux: + python.version: '3.7' + Python37Windows: + python.version: '3.7' + vmImage: 'windows-latest' + Python37Mac: + python.version: '3.7' + vmImage: 'macos-latest' + Pypy3Linux: + python.version: 'pypy3' + Python36Linux: + python.version: '3.6' + Python35Linux: + python.version: '3.5' + Python27Linux: + python.version: '2.7' + Python27Windows: + python.version: '2.7' + vmImage: 'windows-latest' + DocsHtml: + TOXENV: docs-html + publish.test.results: 'false' + VersionRange: + TOXENV: devel,lowest,codecov -pool: - vmImage: $[ variables.vmImage ] + pool: + vmImage: $[ variables.vmImage ] -steps: -- task: UsePythonVersion@0 - inputs: - versionSpec: $(python.version) - architecture: $(python.architecture) + steps: + - task: UsePythonVersion@0 + inputs: + versionSpec: $(python.version) + architecture: $(python.architecture) -- script: pip install -U tox - displayName: 'Install tox' + - script: pip install -U tox + displayName: 'Install tox' -- script: tox - displayName: 'Run tox' + - script: tox -- --junitxml=unittests/TEST-$(Agent.JobName).xml + displayName: 'Run tox' -# TODO: add codecov token -# TODO: emit JUnit test results -# TODO: build on nightly + - task: PublishTestResults@2 + inputs: + testResultsFiles: '**/TEST-*.xml' + testRunTitle: '$(Agent.JobName)' + condition: eq(variables['publish.test.results'], 'true') + + # TODO: add codecov token + +# As a courtesy, try this on the dev version of Python +# Use a container since Azure Pipelines may not have the bleeding-edge Python RC +- job: FlaskOnLatest + pool: { vmImage: ubuntu-latest } + container: python:rc-stretch + steps: + - script: | + echo "##vso[task.prependPath]$HOME/.local/bin" + pip install -U --user tox + displayName: 'Install tox' + + - script: | + tox + exit 0 # don't fail the build if this doesn't work! + displayName: 'Run tox' diff --git a/tox.ini b/tox.ini index d37d2486..ad618ed2 100644 --- a/tox.ini +++ b/tox.ini @@ -35,7 +35,7 @@ commands = pip install -q -e examples/javascript[test] # pytest-cov doesn't seem to play nice with -p - coverage run -p -m pytest tests examples + coverage run -p -m pytest tests examples {posargs} [testenv:docs-html] deps =