Skip to content

Commit 288dae0

Browse files
committed
Relax requirements and use more strict CI
Signed-off-by: Aleksei Stepanov <[email protected]>
1 parent 4faaefb commit 288dae0

File tree

5 files changed

+45
-10
lines changed

5 files changed

+45
-10
lines changed

.azure_pipelines/run_tests.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ jobs:
99
dependsOn:
1010
- PyLint
1111
- MyPy
12+
- PEP8
1213
pool:
1314
vmImage: "vs2017-win2016"
1415

.travis.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,14 +74,14 @@ jobs:
7474
install:
7575
- *upgrade_python_toolset
7676
- *install_deps
77-
- pip install --upgrade "mypy >= 0.660"
77+
- pip install --upgrade "mypy >= 0.670"
7878
script:
7979
- mypy --strict advanced_descriptors
8080
- <<: *static_analysis
8181
name: "PEP8"
8282
install:
8383
- *upgrade_python_toolset
84-
- pip install --upgrade flake8
84+
- pip install --upgrade flake8 flake8-bugbear
8585
script:
8686
- flake8
8787

azure-pipelines.yml

Lines changed: 38 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,36 @@
44
# https://docs.microsoft.com/azure/devops/pipelines/languages/python
55

66
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+
734
- job: 'PyLint'
835
pool:
936
vmIMage: 'VS2017-Win2016'
10-
strategy:
11-
maxParallel: 1
1237
steps:
1338
- task: UsePythonVersion@0
1439
inputs:
@@ -18,13 +43,21 @@ jobs:
1843
python -m pip install --upgrade pip
1944
pip install -U setuptools
2045
pip install -r requirements.txt
46+
pip install -U pytest pylint pytest-pylint pytest-sugar
2147
displayName: 'Install dependencies'
2248
2349
- script: |
24-
pip install -U pylint
25-
pylint -f msvs advanced_descriptors
50+
pytest -vvv --pylint -m pylint --junitxml=pylint_result.xml advanced_descriptors
2651
displayName: 'PyLint'
2752
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+
2861
- job: 'MyPy'
2962
pool:
3063
vmIMage: 'VS2017-Win2016'
@@ -37,10 +70,10 @@ jobs:
3770
python -m pip install --upgrade pip
3871
pip install -U setuptools
3972
pip install -r requirements.txt
73+
pip install -U mypy
4074
displayName: 'Install dependencies'
4175
4276
- script: |
43-
pip install -U mypy
4477
mypy --strict --junit-xml=mypy_result.xml advanced_descriptors
4578
displayName: 'MyPy'
4679

requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
typing >= 3.6 ; python_version < "3.8"
1+
typing >= 3.6 ; python_version < "3.7"

tox.ini

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ commands = {posargs:}
4747
[testenv:pep8]
4848
deps =
4949
flake8
50+
flake8-bugbear
5051
usedevelop = False
5152
commands = flake8
5253

@@ -63,7 +64,7 @@ commands = pip install ./ -vvv -U
6364

6465
[testenv:pylint]
6566
deps =
66-
pylint>2.1
67+
pylint>2.2
6768
-r{toxinidir}/CI_REQUIREMENTS.txt
6869
commands = pylint advanced_descriptors
6970

@@ -127,6 +128,6 @@ commands =
127128

128129
[testenv:mypy]
129130
deps =
130-
mypy>=0.660
131+
mypy>=0.670
131132
-r{toxinidir}/CI_REQUIREMENTS.txt
132133
commands = mypy --strict advanced_descriptors

0 commit comments

Comments
 (0)