/
azure-pipelines.yml
101 lines (86 loc) · 3.35 KB
/
azure-pipelines.yml
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
# Python package
# Create and test a Python package on multiple Python versions.
# Add steps that analyze code, save the dist with the build record, publish to a PyPI-compatible index, and more:
# https://docs.microsoft.com/azure/devops/pipelines/languages/python
jobs:
- job: 'PEP8'
pool:
vmIMage: 'VS2017-Win2016'
steps:
- task: UsePythonVersion@0
inputs:
versionSpec: '3.7'
- script: |
python -m pip install --upgrade pip
pip install -U setuptools virtualenv
pip install -r CI_REQUIREMENTS.txt
pip install -U pytest pytest-sugar pytest-flake8 flake8-bugbear flake8-docstrings
displayName: 'Install dependencies'
- script: |
pytest --flake8 -m flake8 --junitxml=flake8_result.xml exec_helpers
displayName: 'PEP8'
- task: PublishTestResults@2
displayName: publish test results via junit
condition: succeededOrFailed()
inputs:
testResultsFormat: "JUnit"
testResultsFiles: ${{ format('$(System.DefaultWorkingDirectory)/flake8_result.xml') }}
testRunTitle: 'PEP8'
- job: 'PyLint'
pool:
vmIMage: 'VS2017-Win2016'
steps:
- task: UsePythonVersion@0
inputs:
versionSpec: '3.7'
- script: |
python -m pip install --upgrade pip
pip install -U setuptools virtualenv
pip install -r CI_REQUIREMENTS.txt
pip install -U pylint pylint_junit isort[pyproject,requirements]
displayName: 'Install dependencies'
- script: |
python setup.py --version clean
displayName: 'Generate version file'
- script: |
pylint --output-format=pylint_junit.JUnitReporter exec_helpers > pylint_result.xml
displayName: 'PyLint'
- task: PublishTestResults@2
displayName: publish test results via junit
condition: succeededOrFailed()
inputs:
testResultsFormat: "JUnit"
testResultsFiles: ${{ format('$(System.DefaultWorkingDirectory)/pylint_result.xml') }}
testRunTitle: 'PyLint'
- job: 'MyPy'
pool:
vmIMage: 'VS2017-Win2016'
steps:
- task: UsePythonVersion@0
inputs:
versionSpec: '3.7'
- script: |
python -m pip install --upgrade pip
pip install -U setuptools virtualenv
pip install -r CI_REQUIREMENTS.txt
pip install -U "mypy>=0.720"
displayName: 'Install dependencies'
- script: |
python setup.py --version
displayName: 'Generate version file'
- script: |
mypy --strict --junit-xml=mypy_result.xml exec_helpers
displayName: 'MyPy'
- task: PublishTestResults@2
displayName: publish test results via junit
condition: succeededOrFailed()
inputs:
testResultsFormat: "JUnit"
testResultsFiles: ${{ format('$(System.DefaultWorkingDirectory)/mypy_result.xml') }}
testRunTitle: 'MyPy'
- template: .azure_pipelines/run_tests.yml
parameters: {name: 'Python_36', python: '3.6', architecture: 'x64', kind: 'native'}
- template: .azure_pipelines/run_tests.yml
parameters: {name: 'Python_37', python: '3.7', architecture: 'x64', kind: 'native'}
- template: .azure_pipelines/run_tests.yml
parameters: {name: 'Python_38', python: '3.8', architecture: 'x64', kind: 'native'}