forked from agronholm/anyio
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathazure-pipelines.yaml
104 lines (85 loc) · 2.44 KB
/
azure-pipelines.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
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-Py38:
imageName: 'ubuntu-latest'
python.version: '3.8'
Linux-PyPy3:
imageName: 'ubuntu-latest'
python.version: 'pypy3'
Mac-Py35:
imageName: 'macos-10.13'
python.version: '3.5'
Mac-Py38:
imageName: 'macos-latest'
python.version: '3.8'
Win-Py35:
imageName: 'vs2017-win2016'
python.version: '3.5'
Win-Py38:
imageName: 'windows-latest'
python.version: '3.8'
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
displayName: Run pytest
- task: PublishTestResults@2
displayName: Publish test results
condition: succeededOrFailed()
inputs:
testResultsFiles: '$(System.DefaultWorkingDirectory)/junit.xml'
- script: coverage xml
displayName: Generate coverage report
- 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