Skip to content

Commit 796f3e2

Browse files
committed
use test matrix
1 parent 99aa1d5 commit 796f3e2

File tree

1 file changed

+59
-26
lines changed

1 file changed

+59
-26
lines changed

azure-pipelines.yml

Lines changed: 59 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -6,53 +6,86 @@ pr:
66
- "*"
77

88
jobs:
9-
- job: pytest36
9+
- job: pytest
10+
strategy:
11+
# use cross-product when https://github.com/microsoft/azure-pipelines-yaml/issues/20 is solved
12+
matrix:
13+
UbuntuPython36:
14+
python.version: '3.6'
15+
vmImage: 'ubuntu-16.04'
16+
tox_env: '36'
17+
UbuntuPython37:
18+
python.version: '3.7'
19+
vmImage: 'ubuntu-16.04'
20+
tox_env: '37'
21+
UbuntuPython38:
22+
python.version: '3.8'
23+
vmImage: 'ubuntu-16.04'
24+
tox_env: '38'
25+
26+
macOSPython36:
27+
python.version: '3.6'
28+
vmImage: 'macOS-10.13'
29+
tox_env: '36'
30+
macOSPython37:
31+
python.version: '3.7'
32+
vmImage: 'macOS-10.13'
33+
tox_env: '37'
34+
macOSPython38:
35+
python.version: '3.8'
36+
vmImage: 'macOS-10.13'
37+
tox_env: '38'
38+
39+
WindowsPython36:
40+
python.version: '3.6'
41+
vmImage: 'vs2017-win2016'
42+
tox_env: '36'
43+
WindowsPython37:
44+
python.version: '3.7'
45+
vmImage: 'vs2017-win2016'
46+
tox_env: '37'
47+
WindowsPython38:
48+
python.version: '3.8'
49+
vmImage: 'vs2017-win2016'
50+
tox_env: '38'
51+
pool:
52+
vmImage: '$(vmImage)'
1053
steps:
1154
- task: UsePythonVersion@0
1255
inputs:
13-
versionSpec: '3.6'
56+
versionSpec: '$(python.version)'
1457
- script: pip install tox
15-
displayName: 'Install tox'
16-
- script: tox -e py36
17-
displayName: 'Run the tests'
58+
displayName: Install tox
59+
- script: tox -e bare$(tox_env)
60+
displayName: Run the bare tests
61+
- script: tox -e clean
62+
displayName: Clean
63+
- script: tox -e py$(tox_env)
64+
displayName: Run the tests
1865

19-
- job: pytest37
66+
- job: coverage
2067
steps:
2168
- task: UsePythonVersion@0
2269
inputs:
2370
versionSpec: '3.7'
2471
- script: pip install tox
25-
displayName: 'Install tox'
26-
- script: tox -e py37
27-
displayName: 'Run the tests'
28-
- script: tox -e report
29-
displayName: 'Test coverage'
72+
displayName: Install tox
73+
- script: tox -e py37,report
74+
displayName: Run the tests and generate coverage
3075
- script: |
3176
pip install codecov
3277
codecov -t $(CODECOV_TOKEN) -f .coverage.xml
33-
displayName: 'Test upload coverage'
34-
- script: tox -e clean
35-
displayName: 'Test cleanup'
36-
37-
- job: pytest38
38-
steps:
39-
- task: UsePythonVersion@0
40-
inputs:
41-
versionSpec: '3.8'
42-
- script: pip install tox
43-
displayName: 'Install tox'
44-
- script: tox -e py38
45-
displayName: 'Run the tests'
78+
displayName: Test upload coverage
4679
4780
- job: pre_commit
4881
steps:
4982
- task: UsePythonVersion@0
5083
inputs:
5184
versionSpec: '3.7'
5285
- script: pip install tox
53-
displayName: 'Install tox'
86+
displayName: Install tox
5487
- script: tox -e pre-commit
55-
displayName: 'Lining tests'
88+
displayName: Lining tests
5689

5790
- job: authors_check
5891
steps:

0 commit comments

Comments
 (0)