Skip to content
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 our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support on azure-pipelines.yml #511

Closed
wants to merge 13 commits into from
76 changes: 39 additions & 37 deletions azure-pipelines.yml
Expand Up @@ -7,59 +7,61 @@ jobs:
vmImage: 'Ubuntu-16.04'
strategy:
matrix:
Typing:
python.version: '3.7'
TOXENV: typing
Lint:
python.version: '3.7'
TOXENV: lint

py27:
Python27:
python.version: '2.7'
TOXENV: py27
py34:
tox.target: 'py27'
Python34:
python.version: '3.4'
TOXENV: py34
py35:
tox.target: 'py34'
Python35:
python.version: '3.5'
TOXENV: py35
py36:
tox.target: 'py35'
Python36:
python.version: '3.6'
TOXENV: py36
py37:
python.version: '3.7'
TOXENV: py37

Docs:
python.version: '3.7'
TOXENV: docs
PyPI-Description:
python.version: '3.7'
TOXENV: pypi-description
Changelog:
tox.target: 'py36'
Python37:
python.version: '3.7'
TOXENV: changelog

tox.target: 'py37'
steps:
- task: UsePythonVersion@0
inputs:
versionSpec: '$(python.version)'
architecture: 'x64'

- script: python -m pip install --upgrade tox codecov
displayName: install tox
- script: tox -- --junitxml=report.xml
displayName: run tox

- script: tox -e $(tox.target)
displayName: run tox for Python Runtimes

- script: |
coverage combine
codecov -t $(CODECOV_TOKEN)
codecov
displayName: Report Coverage

- task: PublishTestResults@2
env:
CODECOV_TOKEN: 'CODECOV TOKEN?'
- job: 'Checks'
pool:
vmImage: 'Ubuntu-16.04'
strategy:
matrix:
Python37:
python.version: '3.7'
steps:
- task: UsePythonVersion@0
inputs:
testResultsFiles: 'report.xml'
testRunTitle: '$(Agent.OS) - $(Build.DefinitionName) - Python $(python.version)'
condition: succeededOrFailed()
versionSpec: '$(python.version)'
architecture: 'x64'
- script: python -m pip install --upgrade tox codecov
displayName: install tox

- script: tox -e typing
displayName: run tox for typing

- script: tox -e lint,docs
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

any reason why you grouped these together?

displayName: run tox for documentation and code linting

- script: tox -e pypi-description,changelog
displayName: run tox for metadata

- job: Build_Packages
dependsOn: 'Test'
Expand Down
1 change: 1 addition & 0 deletions tox.ini
Expand Up @@ -8,6 +8,7 @@ isolated_build = True
# https://github.com/pypa/setuptools/issues/1042 from breaking our builds.
setenv =
VIRTUALENV_NO_DOWNLOAD=1
deps = pytest-azurepipelines
extras = tests
commands = python -m pytest {posargs}

Expand Down