flask/.azure-pipelines.yml

86 lines
2.3 KiB
YAML
Raw Normal View History

2019-05-16 13:53:49 -07:00
trigger:
- 'master'
- '*.x'
jobs:
2019-11-18 19:06:57 -08:00
- job: Tests
2019-05-16 13:53:49 -07:00
variables:
2019-11-18 18:57:43 -08:00
vmImage: 'ubuntu-latest'
python.version: '3.8'
2019-05-16 13:53:49 -07:00
TOXENV: 'py,coverage-ci'
2019-11-18 18:57:43 -08:00
hasTestResults: 'true'
2019-05-16 13:53:49 -07:00
strategy:
matrix:
2019-11-18 18:57:43 -08:00
Python 3.8 Linux:
vmImage: 'ubuntu-latest'
Python 3.8 Windows:
2019-05-16 13:53:49 -07:00
vmImage: 'windows-latest'
2019-11-18 18:57:43 -08:00
Python 3.8 Mac:
2019-05-16 13:53:49 -07:00
vmImage: 'macos-latest'
2019-11-18 18:57:43 -08:00
PyPy 3 Linux:
2019-05-16 13:53:49 -07:00
python.version: 'pypy3'
2019-11-18 18:57:43 -08:00
Python 3.7 Linux:
python.version: '3.7'
Python 3.6 Linux:
2019-05-16 13:53:49 -07:00
python.version: '3.6'
2019-11-18 18:57:43 -08:00
Python 3.5 Linux:
2019-05-16 13:53:49 -07:00
python.version: '3.5'
2019-11-18 18:57:43 -08:00
Python 2.7 Linux:
2019-05-16 13:53:49 -07:00
python.version: '2.7'
2019-11-18 18:57:43 -08:00
Python 2.7 Windows:
2019-05-16 13:53:49 -07:00
python.version: '2.7'
vmImage: 'windows-latest'
2019-11-18 18:57:43 -08:00
Docs:
TOXENV: 'docs'
hasTestResults: 'false'
Style:
2019-11-18 18:57:43 -08:00
TOXENV: 'style'
hasTestResults: 'false'
2019-05-16 13:53:49 -07:00
VersionRange:
TOXENV: 'devel,lowest,coverage-ci'
pool:
vmImage: $[ variables.vmImage ]
steps:
- task: UsePythonVersion@0
inputs:
versionSpec: $(python.version)
displayName: Use Python $(python.version)
- script: pip --disable-pip-version-check install -U tox
displayName: Install tox
2019-11-18 18:57:43 -08:00
- script: tox -s false -- --junitxml=test-results.xml tests examples
2019-05-16 13:53:49 -07:00
displayName: Run tox
- task: PublishTestResults@2
inputs:
testResultsFiles: test-results.xml
testRunTitle: $(Agent.JobName)
2019-11-18 18:57:43 -08:00
condition: eq(variables['hasTestResults'], 'true')
2019-05-16 13:53:49 -07:00
displayName: Publish test results
- task: PublishCodeCoverageResults@1
inputs:
codeCoverageTool: Cobertura
summaryFileLocation: coverage.xml
2019-11-18 18:57:43 -08:00
condition: eq(variables['hasTestResults'], 'true')
2019-05-16 13:53:49 -07:00
displayName: Publish coverage results
# Test on the nightly version of Python.
# Use a container since Azure Pipelines may not have the latest build.
- job: FlaskOnNightly
pool:
vmImage: ubuntu-latest
container: python:rc-stretch
steps:
- script: |
echo "##vso[task.prependPath]$HOME/.local/bin"
pip --disable-pip-version-check install --user -U tox
displayName: Install tox
- script: tox -e nightly
displayName: Run tox