82 lines
2 KiB
YAML
82 lines
2 KiB
YAML
trigger:
|
|
- 'master'
|
|
- '*.x'
|
|
|
|
jobs:
|
|
- job: Flask
|
|
variables:
|
|
vmImage: ubuntu-latest
|
|
python.version: '3.7'
|
|
python.architecture: 'x64'
|
|
TOXENV: 'py,codecov'
|
|
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'
|
|
publish.test.results: 'false'
|
|
VersionRange:
|
|
TOXENV: 'devel,lowest,codecov'
|
|
|
|
pool:
|
|
vmImage: $[ variables.vmImage ]
|
|
|
|
steps:
|
|
- task: UsePythonVersion@0
|
|
inputs:
|
|
versionSpec: $(python.version)
|
|
architecture: $(python.architecture)
|
|
displayName: 'Use Python $(python.version)'
|
|
|
|
- script: pip install -U tox
|
|
displayName: 'Install tox'
|
|
|
|
- script: tox
|
|
displayName: 'Run tox'
|
|
|
|
- task: PublishTestResults@2
|
|
inputs:
|
|
testResultsFiles: 'test-results.xml'
|
|
testRunTitle: '$(Agent.JobName)'
|
|
condition: eq(variables['publish.test.results'], 'true')
|
|
displayName: 'Publish test results'
|
|
|
|
# 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
|
|
variables:
|
|
TOXENV: 'future'
|
|
steps:
|
|
- script: |
|
|
echo "##vso[task.prependPath]$HOME/.local/bin"
|
|
pip install -U --user tox
|
|
displayName: 'Install tox'
|
|
|
|
# don't fail the build if this doesn't work!
|
|
- script: tox
|
|
displayName: 'Run tox'
|