Skip to content

Commit 7276965

Browse files
committed
Relax requirements and use more strict CI
Signed-off-by: Aleksei Stepanov <penguinolog@gmail.com> (cherry picked from commit 288dae0) Signed-off-by: Aleksei Stepanov <penguinolog@gmail.com>
1 parent 087b142 commit 7276965

File tree

5 files changed

+45
-17
lines changed

5 files changed

+45
-17
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
@@ -83,14 +83,14 @@ jobs:
8383
install:
8484
- *upgrade_python_toolset
8585
- *install_deps
86-
- pip install --upgrade "mypy >= 0.660"
86+
- pip install --upgrade "mypy >= 0.670"
8787
script:
8888
- mypy --strict advanced_descriptors
8989
- <<: *static_analysis
9090
name: "PEP8"
9191
install:
9292
- *upgrade_python_toolset
93-
- pip install --upgrade flake8
93+
- pip install --upgrade flake8 flake8-bugbear
9494
script:
9595
- flake8
9696

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 & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -58,16 +58,10 @@ commands =
5858
[testenv:venv]
5959
commands = {posargs:}
6060

61-
[tox:travis]
62-
3.4 = py34,
63-
3.5 = py35,
64-
3.6 = py36,
65-
3.7 = py37,
66-
pypy3 = install, pypy3,
67-
6861
[testenv:pep8]
6962
deps =
7063
flake8
64+
flake8-bugbear
7165
usedevelop = False
7266
commands = flake8
7367

@@ -84,7 +78,7 @@ commands = pip install ./ -vvv -U
8478

8579
[testenv:pylint]
8680
deps =
87-
pylint>2.1
81+
pylint>2.2
8882
-r{toxinidir}/CI_REQUIREMENTS.txt
8983
commands = pylint advanced_descriptors
9084

@@ -148,6 +142,6 @@ commands =
148142

149143
[testenv:mypy]
150144
deps =
151-
mypy>=0.630
145+
mypy>=0.670
152146
-r{toxinidir}/CI_REQUIREMENTS.txt
153147
commands = mypy --strict advanced_descriptors

0 commit comments

Comments
 (0)