Skip to content

Commit 459c4d0

Browse files
committed
Require MyPy for Azure CI
Signed-off-by: Alexey Stepanov <penguinolog@gmail.com>
1 parent 87ddf5c commit 459c4d0

File tree

2 files changed

+30
-1
lines changed

2 files changed

+30
-1
lines changed

.azure_pipelines/run_tests.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,9 @@ parameters:
66

77
jobs:
88
- job: ${{ format('{0}_{1}_{2}', parameters.name, parameters.architecture, parameters.kind) }}
9-
dependsOn: PyLint
9+
dependsOn:
10+
- PyLint
11+
- MyPy
1012
pool:
1113
vmImage: "vs2017-win2016"
1214

azure-pipelines.yml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,33 @@ jobs:
2424
pip install -U pylint
2525
pylint -f msvs advanced_descriptors
2626
displayName: 'PyLint'
27+
28+
- job: 'MyPy'
29+
pool:
30+
vmIMage: 'VS2017-Win2016'
31+
steps:
32+
- task: UsePythonVersion@0
33+
inputs:
34+
versionSpec: '3.7'
35+
36+
- script: |
37+
python -m pip install --upgrade pip
38+
pip install -U setuptools
39+
pip install -r requirements.txt
40+
displayName: 'Install dependencies'
41+
42+
- script: |
43+
pip install -U mypy
44+
mypy --strict --junit-xml=mypy_result.xml advanced_descriptors
45+
displayName: 'MyPy'
46+
47+
- task: PublishTestResults@2
48+
displayName: publish test results via junit
49+
condition: succeededOrFailed()
50+
inputs:
51+
testResultsFormat: "JUnit"
52+
testResultsFiles: ${{ format('$(System.DefaultWorkingDirectory)/mypy_result.xml') }}
53+
testRunTitle: 'MyPy'
2754

2855
- template: .azure_pipelines/run_tests.yml
2956
parameters: {name: 'Python_36', python: '3.6', architecture: 'x64', kind: 'native'}

0 commit comments

Comments
 (0)