forked from saltstack/pepper
-
Notifications
You must be signed in to change notification settings - Fork 1
/
azure-pipelines.yml
60 lines (55 loc) · 1.64 KB
/
azure-pipelines.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
trigger:
- develop
variables:
python: '["py2.7", "py3.4", "py3.5", "py3.6", "py3.7", "py3.8"]'
salt: '["v2018.3", "v2019.2", "develop"]'
backends: '["cherrypy", "tornado"]'
jobs:
- job: build_matrix
pool:
vmImage: 'Ubuntu-16.04'
steps:
- task: UsePythonVersion@0
inputs:
versionSpec: '3.7'
architecture: x64
- task: PythonScript@0
name: matrix
inputs:
scriptSource: Inline
script: |
import json
matrix = {}
for pyver in $(python):
for saltver in $(salt):
for backend in $(backends):
matrix['{0}-{1}-{2}'.format(pyver, backend, saltver)] = {
'python.version': pyver[2:],
'version': pyver.replace('.', ''),
'salt': saltver,
'backend': backend,
}
print('##vso[task.setvariable variable=matrix;isOutput=true]{0}'.format(json.dumps(matrix)))
- job: test_pepper
dependsOn: build_matrix
pool:
vmImage: 'Ubuntu-16.04'
strategy:
matrix: $[ dependencies.build_matrix.outputs['matrix.matrix'] ]
steps:
- task: UsePythonVersion@0
inputs:
versionSpec: '$(python.version)'
architecture: x64
- script: |
pip install tox
displayName: Install dependencies
- script: |
docker run -v $PWD:/pepper --rm "python:$(python.version)" make -C /pepper test PYTHON_VERSION=$(version) SALT=$(salt) BACKEND=$(backend)
displayName: pytest
- script: |
sudo chown $USER .tox/
tox -e codecov
displayName: codecov
env:
CODECOV_TOKEN: '16c2a232-4329-438c-b163-ccbfeeab47aa'