4
4
# https://docs.microsoft.com/azure/devops/pipelines/languages/python
5
5
6
6
jobs :
7
+ - job : ' PEP8'
8
+ pool :
9
+ vmIMage : ' VS2017-Win2016'
10
+ steps :
11
+ - task : UsePythonVersion@0
12
+ inputs :
13
+ versionSpec : ' 3.7'
14
+
15
+ - script : |
16
+ python -m pip install --upgrade pip
17
+ pip install -U setuptools
18
+ pip install -r requirements.txt
19
+ pip install -U pytest pylint pytest-sugar pytest-flake8 flake8-bugbear flake8-docstrings
20
+ displayName: 'Install dependencies'
21
+
22
+ - script : |
23
+ pytest -vvv --flake8 -m flake8 --junitxml=flake8_result.xml advanced_descriptors
24
+ displayName: 'PEP8'
25
+
26
+ - task : PublishTestResults@2
27
+ displayName : publish test results via junit
28
+ condition : succeededOrFailed()
29
+ inputs :
30
+ testResultsFormat : " JUnit"
31
+ testResultsFiles : ${{ format('$(System.DefaultWorkingDirectory)/flake8_result.xml') }}
32
+ testRunTitle : ' PEP8'
33
+
7
34
- job : ' PyLint'
8
35
pool :
9
36
vmIMage : ' VS2017-Win2016'
10
- strategy :
11
- maxParallel : 1
12
37
steps :
13
38
- task : UsePythonVersion@0
14
39
inputs :
@@ -18,13 +43,21 @@ jobs:
18
43
python -m pip install --upgrade pip
19
44
pip install -U setuptools
20
45
pip install -r requirements.txt
46
+ pip install -U pytest pylint pytest-pylint pytest-sugar
21
47
displayName: 'Install dependencies'
22
48
23
49
- script : |
24
- pip install -U pylint
25
- pylint -f msvs advanced_descriptors
50
+ pytest -vvv --pylint -m pylint --junitxml=pylint_result.xml advanced_descriptors
26
51
displayName: 'PyLint'
27
52
53
+ - task : PublishTestResults@2
54
+ displayName : publish test results via junit
55
+ condition : succeededOrFailed()
56
+ inputs :
57
+ testResultsFormat : " JUnit"
58
+ testResultsFiles : ${{ format('$(System.DefaultWorkingDirectory)/pylint_result.xml') }}
59
+ testRunTitle : ' PyLint'
60
+
28
61
- job : ' MyPy'
29
62
pool :
30
63
vmIMage : ' VS2017-Win2016'
@@ -37,10 +70,10 @@ jobs:
37
70
python -m pip install --upgrade pip
38
71
pip install -U setuptools
39
72
pip install -r requirements.txt
73
+ pip install -U mypy
40
74
displayName: 'Install dependencies'
41
75
42
76
- script : |
43
- pip install -U mypy
44
77
mypy --strict --junit-xml=mypy_result.xml advanced_descriptors
45
78
displayName: 'MyPy'
46
79
0 commit comments