forked from aboutcode-org/scancode-toolkit
-
Notifications
You must be signed in to change notification settings - Fork 0
/
azure-pipelines.yml
265 lines (222 loc) · 11.5 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
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
################################################################################
# We use Azure to run the full tests suites on multiple Python 3.x
# on multiple Windows, macOS and Linux versions all on 64 bits
# These jobs are using VMs with Azure-provided Python builds
################################################################################
jobs:
################################################################################
# These jobs are using VMs and Azure-provided Pythons 3.10
################################################################################
- template: etc/ci/azure-posix.yml
parameters:
job_name: core_tests
image_name: ubuntu-20.04
python_versions: ['3.10']
test_suites:
misc_and_scancode: |
# cli tests are launched below on all OSes
venv/bin/pytest -n 3 -vvs --test-suite=all \
--ignore=tests/cluecode \
--ignore=tests/licensedcode \
--ignore=tests/scancode/test_cli.py --reruns 2
cluecode_license_base: |
venv/bin/pytest -n 3 -vvs --test-suite=all \
tests/cluecode \
--ignore=tests/licensedcode/test_zzzz_cache.py \
--ignore=tests/licensedcode/test_detection_datadriven_external.py \
--ignore=tests/licensedcode/test_detection_datadriven1.py \
--ignore=tests/licensedcode/test_detection_datadriven2.py \
--ignore=tests/licensedcode/test_detection_datadriven3.py \
--ignore=tests/licensedcode/test_detection_datadriven4.py \
--ignore=tests/licensedcode/test_additional_license.py \
tests/licensedcode --reruns 2
license_datadriven1_2: |
venv/bin/pytest -n 3 -vvs --test-suite=all \
tests/licensedcode/test_detection_datadriven1.py \
tests/licensedcode/test_detection_datadriven2.py
license_datadriven3_4: |
venv/bin/pytest -n 3 -vvs --test-suite=all \
tests/licensedcode/test_detection_datadriven3.py \
tests/licensedcode/test_detection_datadriven4.py
license_datadriven_ext: |
venv/bin/pytest -n 3 -vvs --test-suite=all \
tests/licensedcode/test_detection_datadriven_external.py
license_validate_ext_1: |
venv/bin/pytest -n 3 -vvs --test-suite=validate \
tests/licensedcode/test_detection_validate.py \
-k TestValidateLicenseExtended1
license_validate_ext_2: |
venv/bin/pytest -n 3 -vvs --test-suite=validate \
tests/licensedcode/test_detection_validate.py \
-k TestValidateLicenseExtended2
license_validate_ext_3: |
venv/bin/pytest -n 3 -vvs --test-suite=validate \
tests/licensedcode/test_detection_validate.py \
-k TestValidateLicenseExtended3
license_validate_ext_4: |
venv/bin/pytest -n 3 -vvs --test-suite=validate \
tests/licensedcode/test_detection_validate.py \
-k TestValidateLicenseExtended4
license_validate_ext_5: |
venv/bin/pytest -n 3 -vvs --test-suite=validate \
tests/licensedcode/test_detection_validate.py \
-k TestValidateLicenseExtended5
license_validate_ignorables_1: |
venv/bin/pytest -n 3 -vvs --test-suite=validate \
tests/licensedcode/test_detection_validate.py \
-k TestValidateLicenseIgnorableClues1
license_validate_ignorables_2: |
venv/bin/pytest -n 3 -vvs --test-suite=validate \
tests/licensedcode/test_detection_validate.py \
-k TestValidateLicenseIgnorableClues2
license_validate_ignorables_3: |
venv/bin/pytest -n 3 -vvs --test-suite=validate \
tests/licensedcode/test_detection_validate.py \
-k TestValidateLicenseIgnorableClues3
license_validate_ignorables_4: |
venv/bin/pytest -n 3 -vvs --test-suite=validate \
tests/licensedcode/test_detection_validate.py \
-k TestValidateLicenseIgnorableClues4
license_validate_ignorables_5: |
venv/bin/pytest -n 3 -vvs --test-suite=validate \
tests/licensedcode/test_detection_validate.py \
-k TestValidateLicenseIgnorableClues5
license_cache: |
venv/bin/pytest -n 3 -vvs --test-suite=all \
tests/licensedcode/test_zzzz_cache.py --reruns 2
# this test runs in isolation because it modifies the actual
# license index with additional licenses provided by a plugin
# and we use the special --test-suite=plugins marker for these
# tests
additional_license_combined: |
venv/bin/pip install tests/licensedcode/data/additional_licenses/additional_plugin_1/
venv/bin/pip install tests/licensedcode/data/additional_licenses/additional_plugin_2/
venv/bin/scancode-reindex-licenses \
--additional-directory tests/licensedcode/data/additional_licenses/additional_dir/
venv/bin/pytest -vvs --test-suite=plugins \
tests/licensedcode/test_additional_license.py
- template: etc/ci/azure-posix.yml
parameters:
job_name: ubuntu20_cpython
image_name: ubuntu-20.04
python_architecture: x64
python_versions: ['3.8', '3.9', '3.10', '3.11', '3.12']
test_suites:
all: venv/bin/pytest -n 2 -vvs tests/scancode/test_cli.py --reruns 2
- template: etc/ci/azure-posix.yml
parameters:
job_name: ubuntu22_cpython
image_name: ubuntu-22.04
python_architecture: x64
python_versions: ['3.8', '3.9', '3.10', '3.11', '3.12']
test_suites:
all: venv/bin/pytest -n 2 -vvs tests/scancode/test_cli.py --reruns 2
- template: etc/ci/azure-posix.yml
parameters:
job_name: macos12_cpython
image_name: macOS-12
python_versions: ['3.8', '3.9', '3.10', '3.11', '3.12']
python_architecture: x64
test_suites:
all: venv/bin/pytest -n 2 -vvs tests/scancode/test_cli.py --reruns 2
- template: etc/ci/azure-posix.yml
parameters:
job_name: macos13_cpython
image_name: macOS-13
python_versions: ['3.8', '3.9', '3.10', '3.11', '3.12']
test_suites:
all: venv/bin/pytest -n 2 -vvs tests/scancode/test_cli.py --reruns 2
- template: etc/ci/azure-win.yml
parameters:
job_name: win2019_cpython_1
image_name: windows-2019
python_versions: ['3.8']
python_architecture: x64
test_suites:
all: venv\Scripts\pytest -n 2 -vvs tests\scancode\test_cli.py --reruns 2
- template: etc/ci/azure-win.yml
parameters:
job_name: win2022_cpython
image_name: windows-2022
python_architecture: x64
python_versions: ['3.8', '3.9', '3.10', '3.11', '3.12']
test_suites:
all: venv\Scripts\pytest -n 2 -vvs tests\scancode\test_cli.py --reruns 2
- template: etc/ci/azure-win.yml
parameters:
job_name: win2022_cpython_1
image_name: windows-2022
python_versions: ['3.8']
python_architecture: x64
test_suites:
all: venv\Scripts\pytest -n 2 -vvs tests\scancode\test_cli.py --reruns 2
- template: etc/ci/azure-win.yml
parameters:
job_name: win2022_cpython_2
image_name: windows-2022
python_versions: ['3.8', '3.9', '3.10', '3.11', '3.12']
python_architecture: x64
test_suites:
all: venv\Scripts\pytest -n 2 -vvs tests\scancode\test_cli.py --reruns 2
################################################################################
# Test using many version of Click to work around any regressions in their API
################################################################################
- template: etc/ci/azure-posix.yml
parameters:
job_name: ubuntu20_test_all_supported_click_versions
image_name: ubuntu-20.04
python_versions: ['3.8', '3.9', '3.10', '3.11', '3.12']
python_architecture: x64
test_suites:
click_versions: |
for clk_ver in 8.1.3 8.1.2 8.1.1 8.1.0 8.0.4 8.0.3 8.0.2 8.0.1 7.1.2 7.1.1 7.1 6.7;
do
venv/bin/pip install click==$clk_ver;
venv/bin/scancode -i samples/ -n3 --json foo.json;
venv/bin/scancode -i --verbose samples/ -n3 --json foo.json;
done
################################################################################
# Tests using a plain pip install to get the latest of all wheels
################################################################################
- template: etc/ci/azure-posix.yml
parameters:
job_name: ubuntu22_cpython_latest_from_pip
image_name: ubuntu-22.04
python_versions: ['3.8', '3.9', '3.10', '3.11', '3.12']
test_suites:
all: venv/bin/pip install --upgrade-strategy eager --force-reinstall --upgrade -e .[testing] && venv/bin/pytest -n 2 -vvs tests/scancode/test_cli.py
- template: etc/ci/azure-posix.yml
parameters:
job_name: ubuntu20_cpython_latest_from_pip
image_name: ubuntu-20.04
python_versions: ['3.8', '3.9', '3.10', '3.11', '3.12']
test_suites:
all: venv/bin/pip install --upgrade-strategy eager --force-reinstall --upgrade -e .[testing] && venv/bin/pytest -n 2 -vvs tests/scancode/test_cli.py
- template: etc/ci/azure-posix.yml
parameters:
job_name: macos12_cpython_latest_from_pip
image_name: macos-12
python_versions: ['3.8', '3.9', '3.10', '3.11', '3.12']
test_suites:
all: venv/bin/pip install --upgrade-strategy eager --force-reinstall --upgrade -e .[testing] && venv/bin/pytest -n 2 -vvs tests/scancode/test_cli.py
- template: etc/ci/azure-posix.yml
parameters:
job_name: macos13_cpython_latest_from_pip
image_name: macos-13
python_versions: ['3.8', '3.9', '3.10', '3.11', '3.12']
test_suites:
all: venv/bin/pip install --upgrade-strategy eager --force-reinstall --upgrade -e .[testing] && venv/bin/pytest -n 2 -vvs tests/scancode/test_cli.py
- template: etc/ci/azure-win.yml
parameters:
job_name: win2019_cpython_latest_from_pip
image_name: windows-2019
python_versions: ['3.8', '3.9', '3.10', '3.11', '3.12']
test_suites:
all: venv\Scripts\pip install --upgrade-strategy eager --force-reinstall --upgrade -e .[testing] && venv\Scripts\pytest -n 2 -vvs tests\scancode\test_cli.py
- template: etc/ci/azure-win.yml
parameters:
job_name: win2022_cpython_latest_from_pip
image_name: windows-2022
python_versions: ['3.8', '3.9', '3.10', '3.11', '3.12']
test_suites:
all: venv\Scripts\pip install --upgrade-strategy eager --force-reinstall --upgrade -e .[testing] && venv\Scripts\pytest -n 2 -vvs tests\scancode\test_cli.py