Skip to content

Commit

Permalink
Replaced Travis CI with Azure Pipelines
Browse files Browse the repository at this point in the history
  • Loading branch information
agronholm committed May 13, 2019
1 parent c441bdd commit dc80ee0
Show file tree
Hide file tree
Showing 3 changed files with 99 additions and 64 deletions.
60 changes: 0 additions & 60 deletions .travis.yml

This file was deleted.

6 changes: 2 additions & 4 deletions README.rst
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
.. image:: https://travis-ci.com/agronholm/anyio.svg?branch=master
:target: https://travis-ci.com/agronholm/anyio
.. image:: https://dev.azure.com/alexgronholm/anyio/_apis/build/status/agronholm.anyio?branchName=master
:alt: Build Status
.. image:: https://coveralls.io/repos/github/agronholm/anyio/badge.svg?branch=master
:target: https://coveralls.io/github/agronholm/anyio?branch=master
.. image:: https://img.shields.io/azure-devops/coverage/agronholm/anyio/1/master.svg
:alt: Code Coverage
.. image:: https://readthedocs.org/projects/anyio/badge/?version=latest
:target: https://anyio.readthedocs.io/en/latest/?badge=latest
Expand Down
97 changes: 97 additions & 0 deletions azure-pipelines.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,97 @@
stages:
- stage: code_quality
displayName: Static analysis
jobs:
- job: flake8_mypy
pool:
vmImage: 'ubuntu-16.04'

steps:
- task: UsePythonVersion@0
inputs:
versionSpec: '3.7'

- script: pip install flake8 mypy
displayName: Install dependencies

- script: flake8
displayName: Run flake8

- script: mypy anyio
displayName: Run mypy

- stage: run_test_suite
displayName: Run the test suite
jobs:
- job: test
strategy:
matrix:
Linux-Py35:
imageName: 'ubuntu-16.04'
python.version: '3.5'
Linux-Py37:
imageName: 'ubuntu-16.04'
python.version: '3.7'
Linux-PyPy3:
imageName: 'ubuntu-16.04'
python.version: 'pypy3'
Mac-Py35:
imageName: 'macos-10.13'
python.version: '3.5'
Win-Py35:
imageName: 'vs2017-win2016'
python.version: '3.5'

pool:
vmImage: '$(imageName)'

steps:
- task: UsePythonVersion@0
inputs:
versionSpec: '$(python.version)'

- script: pip install .[test,curio,trio]
displayName: Install dependencies

- script: |
coverage run -m pytest --junit-xml=junit.xml
coverage xml
displayName: Run pytest
- task: PublishTestResults@2
displayName: Publish test results
condition: succeededOrFailed()
inputs:
testResultsFiles: '$(System.DefaultWorkingDirectory)/junit.xml'

- task: PublishCodeCoverageResults@1
inputs:
codeCoverageTool: Cobertura
summaryFileLocation: '$(System.DefaultWorkingDirectory)/coverage.xml'

- stage: Deploy
condition: startsWith(variables['Build.SourceBranch'], 'refs/tags/')
jobs:
- job: publish
displayName: Publish to PyPI

pool:
vmImage: 'ubuntu-16.04'

steps:
- task: UsePythonVersion@0
inputs:
versionSpec: '3.7'

- script: pip install twine
displayName: Install Twine

- task: TwineAuthenticate@0
inputs:
externalFeeds: pypi

- script: python setup.py sdist bdist_wheel
displayName: Create packages

- script: 'twine upload -r pypi/anyio --config-file $(PYPIRC_PATH) dist/*'
displayName: Upload packages to PyPI

0 comments on commit dc80ee0

Please sign in to comment.