Merge pull request #4779 from pytest-dev/azure-pipelines

Set up CI with Azure Pipelines [skip travis] [skip appveyor]
This commit is contained in:
Bruno Oliveira 2019-02-13 08:39:32 -02:00 committed by GitHub
commit 8726be27a6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 46 additions and 1 deletions

45
azure-pipelines.yml Normal file
View File

@ -0,0 +1,45 @@
trigger:
- master
- features
variables:
PYTEST_ADDOPTS: "--junitxml=build/test-results/$(tox.env).xml"
jobs:
- job: 'Test'
pool:
vmImage: "vs2017-win2016"
strategy:
matrix:
py27:
python.version: '2.7'
tox.env: 'py27'
py35:
python.version: '3.5'
tox.env: 'py35'
py36:
python.version: '3.6'
tox.env: 'py36'
py37:
python.version: '3.7'
tox.env: 'py37'
maxParallel: 4
steps:
- task: UsePythonVersion@0
inputs:
versionSpec: '$(python.version)'
architecture: 'x64'
- script: python -m pip install --upgrade pip && pip install tox
displayName: 'Install tox'
- script: python -m tox -e $(tox.env)
displayName: 'Run tests'
- task: PublishTestResults@2
inputs:
testResultsFiles: 'build/test-results/$(tox.env).xml'
testRunTitle: '$(tox.env)'
condition: succeededOrFailed()

View File

@ -23,7 +23,7 @@ commands =
{env:_PYTEST_TOX_COVERAGE_RUN:} pytest --lsof {posargs} {env:_PYTEST_TOX_COVERAGE_RUN:} pytest --lsof {posargs}
coverage: coverage combine coverage: coverage combine
coverage: coverage report coverage: coverage report
passenv = USER USERNAME COVERAGE_* TRAVIS passenv = USER USERNAME COVERAGE_* TRAVIS PYTEST_ADDOPTS
setenv = setenv =
# Configuration to run with coverage similar to Travis/Appveyor, e.g. # Configuration to run with coverage similar to Travis/Appveyor, e.g.
# "tox -e py37-coverage". # "tox -e py37-coverage".