forked from ARMmbed/mbed-os-tools
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathazure-pipelines.yml
142 lines (142 loc) · 5.7 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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
jobs:
-
job: code_style_check
pool:
vmImage: ubuntu-16.04
steps:
-
task: UsePythonVersion@0
inputs:
versionSpec: "3.7"
architecture: x64
-
script: pip install --user flake8==3.7.3
displayName: "Install flake8"
-
script: python -m flake8
displayName: "Run flake8"
-
job: test
strategy:
matrix:
linux_python_2_7:
python.version: "2.7"
imageName: ubuntu-16.04
sendCoverage: "false"
linux_python_3_5:
python.version: "3.5"
imageName: ubuntu-16.04
sendCoverage: "false"
linux_python_3_6:
python.version: "3.6"
imageName: ubuntu-16.04
sendCoverage: "false"
linux_python_3_7:
python.version: "3.7"
imageName: ubuntu-16.04
sendCoverage: "true"
mac_python_2_7:
python.version: "2.7"
imageName: macOS-10.15
sendCoverage: "false"
mac_python_3_5:
python.version: "3.5"
imageName: macOS-10.15
sendCoverage: "false"
mac_python_3_6:
python.version: "3.6"
imageName: macOS-10.15
sendCoverage: "false"
mac_python_3_7:
python.version: "3.7"
imageName: macOS-10.15
sendCoverage: "false"
windows_python_2_7:
python.version: "2.7"
imageName: vs2017-win2016
sendCoverage: "false"
windows_python_3_5:
python.version: "3.5"
imageName: vs2017-win2016
sendCoverage: "false"
windows_python_3_6:
python.version: "3.6"
imageName: vs2017-win2016
sendCoverage: "false"
windows_python_3_7:
python.version: "3.7"
imageName: vs2017-win2016
sendCoverage: "false"
maxParallel: 10
pool:
vmImage: $(imageName)
steps:
-
task: UsePythonVersion@0
inputs:
versionSpec: $(python.version)
architecture: x64
-
script: "python -m pip install --upgrade pip && pip install -r test_requirements.txt"
displayName: "Install mbed-os test dependencies"
-
script: "pip install lxml"
env: { STATIC_DEPS: true }
displayName: "Install lxml separately on Linux/MacOS"
-
script: 'pip install --user "urllib3<1.25"'
displayName: "Fix dependency issue for requests package"
-
script: "python -m coverage run setup.py test"
displayName: "Test mbed-os-tools"
-
bash: "python setup.py sdist && pip install dist/*"
displayName: "Install mbed-os-tools"
-
bash: "python setup.py sdist && pip install dist/*"
displayName: "Install mbed-ls"
workingDirectory: "packages/mbed-ls"
-
bash: "python setup.py sdist && pip install dist/*"
displayName: "Install mbed-host-tests"
workingDirectory: "packages/mbed-host-tests"
-
bash: "python setup.py sdist && pip install dist/*"
displayName: "Install mbed-greentea"
workingDirectory: "packages/mbed-greentea"
-
script: "python -m coverage run setup.py test"
displayName: "Test mbed-ls"
workingDirectory: "packages/mbed-ls"
-
script: "python -m coverage run setup.py test"
displayName: "Test mbed-host-tests"
workingDirectory: "packages/mbed-host-tests"
-
script: "python -m coverage run setup.py test"
displayName: "Test mbed-greentea"
workingDirectory: "packages/mbed-greentea"
-
script: |
python -m coverage combine .coverage packages/*/.coverage
python -m coveralls
condition: eq(variables['sendCoverage'], 'true')
displayName: "Send coverage results to coveralls"
-
script: "pip uninstall -y mbed-os-tools mbed-ls mbed-greentea mbed-host-tests"
displayName: "Uninstall sdist packages"
-
script: "pip install ."
displayName: "Ensure mbed-os-tools can be installed locally for development"
-
script: "pip install ."
displayName: "Ensure mbed-ls can be installed locally for development"
workingDirectory: "packages/mbed-ls"
-
script: "pip install ."
displayName: "Ensure mbed-host-tests can be installed locally for development"
workingDirectory: "packages/mbed-host-tests"
-
script: "pip install ."
displayName: "Ensure mbed-greentea can be installed locally for development"
workingDirectory: "packages/mbed-greentea"