-
-
Notifications
You must be signed in to change notification settings - Fork 15
/
laminas-ci.schema.json
464 lines (464 loc) · 18.3 KB
/
laminas-ci.schema.json
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
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
{
"$id": "https://github.com/laminas/laminas-ci-matrix-action/blob/HEAD/laminas-ci.schema.json",
"$schema": "http://json-schema.org/draft-07/schema",
"examples": [
{
"extensions": [
"mbstring",
"pcntl",
"posix"
],
"ini": [
"memory_limit=-1",
"maximum_execution_time=0"
],
"additional_checks": [
{
"name": "Codeception on all supported PHP versions",
"job": {
"php": "*",
"dependencies": "*",
"command": "vendor/bin/codecept run"
}
}
],
"exclude": [
{
"name": "Codeception [7.4, latest]"
},
{
"name": "Codeception",
"php": "7.4",
"dependencies": "latest"
}
],
"ignore_php_platform_requirements": {
"8.0": true,
"7.4": false
},
"stablePHP": "8.0",
"additional_composer_arguments": []
},
{
"extensions": [
"mbstring",
"pcntl",
"posix"
],
"ini": [
"memory_limit=-1",
"maximum_execution_time=0"
],
"checks": [
{
"name": "PHP Linting",
"operatingSystem": "ubuntu-latest",
"action": "laminas/laminas-continuous-integration-action@v1",
"job": {
"php": "7.4",
"command": "find src/ -type f -name \"*.php\" -exec php -l {} \\;"
}
}
],
"ignore_php_platform_requirements": {
"8.0": true,
"7.4": false
},
"stablePHP": "8.0",
"additional_composer_arguments": []
}
],
"title": "Laminas CI configuration schema",
"type": "object",
"anyOf": [
{
"description": "Checks cannot be used in combination with additional checks",
"properties": {
"extensions": {
"$ref": "#/definitions/extensions"
},
"ini": {
"$ref": "#/definitions/ini"
},
"ignore_php_platform_requirements": {
"$ref": "#/definitions/ignore_php_platform_requirements"
},
"stablePHP": {
"$ref": "#/definitions/stablePHP"
},
"checks": {
"type": "array",
"title": "A list of checks to be executed",
"examples": [
[
{
"name": "Single check to be executed",
"operatingSystem": "ubuntu-latest",
"job": "{\"php\": \"8.1\", \"command\": \"php -v\"}"
}
],
[
{
"name": "Stringified job",
"job": "{\"php\": \"7.4\", \"command\": \"php -v\"}"
},
{
"name": "JSON object job",
"operatingSystem": "debian-latest",
"job": {
"php": "7.4",
"command": "php -v"
}
}
]
],
"items": {
"type": "object",
"title": "The job to be executed",
"description": "The job to be executed. Contains all information for the GHA.",
"examples": [
{
"name": "Check #1 to be executed",
"operatingSystem": "debian-latest",
"job": {
"php": "8.1",
"command": "php -v"
}
}
],
"required": [
"name",
"job"
],
"properties": {
"name": {
"type": "string",
"title": "The name of the check",
"description": "The name of the check. Will be displayed in the GHA list of executed actions."
},
"job": {
"oneOf": [
{
"type": "object",
"required": ["php"],
"$ref": "#/definitions/job"
},
{
"type": "string",
"minLength": 2
}
]
},
"operatingSystem": {
"type": "string",
"minLength": 1,
"title": "The name of the OS",
"description": "Name of the OS the job should be run on"
},
"action": {
"type": "string",
"title": "The github action name",
"description": "GHA to run the step on; currently ignored, as GHA does not support dynamic action selection"
}
},
"additionalProperties": false
}
},
"additional_composer_arguments": {
"$ref": "#/definitions/additional_composer_arguments"
}
},
"additionalProperties": false
},
{
"description": "Additional checks cannot be used in combination with checks",
"properties": {
"extensions": {
"$ref": "#/definitions/extensions"
},
"ini": {
"$ref": "#/definitions/ini"
},
"exclude": {
"$ref": "#/definitions/exclude"
},
"ignore_php_platform_requirements": {
"$ref": "#/definitions/ignore_php_platform_requirements"
},
"stablePHP": {
"$ref": "#/definitions/stablePHP"
},
"backwardCompatibilityCheck": {
"$ref": "#/definitions/backwardCompatibilityCheck"
},
"additional_checks": {
"type": "array",
"title": "A list of additional checks to be executed",
"description": "A list of additional checks to be executed. Will be appended to the list, the matrix detects by parsing the project files.",
"examples": [
[
{
"name": "Codeception on all supported PHP versions",
"job": {
"php": "*",
"dependencies": "*",
"command": "vendor/bin/codecept run"
}
}
]
],
"items": {
"type": "object",
"title": "Additional check to be executed",
"examples": [
{
"name": "Codeception on all supported PHP versions",
"job": {
"php": "*",
"dependencies": "*",
"command": "vendor/bin/codecept run"
}
}
],
"required": [
"name",
"job"
],
"properties": {
"name": {
"type": "string",
"title": "The name of the additional check",
"description": "The name of the additional check. Will be displayed in the github actions list of executed checks.",
"examples": [
"Codeception on all supported PHP versions"
]
},
"job": {
"$ref": "#/definitions/job"
}
},
"additionalProperties": false
}
},
"additional_composer_arguments": {
"$ref": "#/definitions/additional_composer_arguments"
}
},
"additionalProperties": false
}
],
"definitions": {
"installablePhpVersion": {
"type": "string",
"title": "Installable PHP versions from available from within the container.",
"enum": [
"5.6",
"7.0",
"7.1",
"7.2",
"7.3",
"7.4",
"8.0",
"8.1",
"8.2",
"8.3",
"8.4",
"@default"
]
},
"php": {
"title": "The PHP version",
"type": "string",
"anyOf": [
{
"$ref": "#/definitions/installablePhpVersion"
},
{
"enum": [
"*",
"@latest",
"@lowest"
]
}
]
},
"extensions": {
"type": "array",
"title": "A list of PHP extensions",
"description": "A list of required PHP extensions which is verified before a job is being executed.",
"examples": [
[
"mbstring",
"pcntl",
"posix"
]
],
"items": {
"type": "string",
"minLength": 1,
"title": "The name of the PHP extension",
"description": "The name of the PHP extension which would also be used in `composer.json` with `ext-`-prefix."
}
},
"ini": {
"type": "array",
"title": "php.ini settings",
"description": "A list of php.ini settings which will be passed to the PHP processes when the job is executed.",
"examples": [
[
"memory_limit = -1",
"maximum_execution_time=0"
]
],
"items": {
"type": "string",
"title": "The php.ini setting.",
"description": "The php.ini setting which is added to the php.ini as a single line. A list of php.ini settings can be found here: https://www.php.net/manual/en/info.configuration.php"
}
},
"exclude": {
"type": "array",
"title": "A list of objects to tell the matrix to exclude.",
"description": "With this list, it is possible to exclude jobs which are created by the matrix. So if the matrix creates a job which you don't want to be executed, just add the name of that job to the list.",
"examples": [
[
{
"name": "Codeception [7.4, latest]"
},
{
"name": "Codeception",
"php": "7.4",
"dependencies": "latest"
}
]
],
"items": {
"type": "object",
"title": "The job description to be excluded",
"examples": [
{
"name": "Codeception [7.4, latest]"
},
{
"name": "Codeception",
"php": "7.4",
"dependencies": "latest"
}
],
"required": [
"name"
],
"properties": {
"name": {
"type": "string",
"title": "The name of the job to be excluded",
"description": "The name of the job to be excluded. Must be an exact match.",
"minLength": 1,
"examples": [
"Codeception [7.4, latest]",
"Codeception"
]
},
"php": {
"ref": "#/definitions/php",
"description": "The PHP version to to be excluded.",
"default": "*"
},
"dependencies": {
"type": "string",
"enum": ["latest", "lowest", "locked", "*"],
"title": "The composer dependencies to be excluded",
"description": "The composer dependencies to be excluded. If the wildcard `*` is passed, all dependencies are being excluded",
"default": "*"
}
},
"additionalProperties": false
}
},
"ignore_php_platform_requirements": {
"type": "object",
"title": "Specifies PHP versions on which composer should ignore the platform requirement.",
"description": "Passing a PHP version in this object with `true` will tell the container action to ignore the PHP platform requirement by passing `--ignore-platform-req=false`.",
"default": {
"8.0": true
},
"examples": [
{
"8.0": false,
"8.1": true
}
],
"additionalProperties": {
"type": "boolean"
}
},
"stablePHP": {
"$ref": "#/definitions/installablePhpVersion",
"title": "The PHP version to be used for stable checks",
"description": "This PHP version is used for all QA check jobs. The default depends on the `composer.json` of the project and usually reflects the minimum supported PHP version of that project.",
"default": "8.0"
},
"backwardCompatibilityCheck": {
"type": "boolean",
"title": "Flag to enable/disable backwards compatibility check",
"description": "This flag enables/disables backwards compatibility check using roave/backward-compatibility-check.",
"default": false
},
"job": {
"type": "object",
"title": "The job to be executed",
"description": "The job to be executed. Can specify dedicated information regarding PHP version(s), composer deps, e.g.",
"examples": [
{
"php": "*",
"dependencies": "*",
"command": "vendor/bin/codecept run"
}
],
"required": [
"command"
],
"properties": {
"php": {
"$ref": "#/definitions/php",
"description": "The PHP version to be used. If the wildcard `*` is passed, a list of checks is created containing *every* supported PHP version by the project and the matrix action.",
"default": "*"
},
"dependencies": {
"type": "string",
"enum": ["latest", "lowest", "locked", "*"],
"title": "The composer dependencies to be used",
"description": "The composer dependencies to be used. If the wildcard `*` is passed, a list of checks is created containing each `lowest` and `latest` composer dependencies.",
"default": "locked"
},
"command": {
"type": "string",
"title": "The command to be executed",
"description": "The command to run to perform the check. The command MUST be executable.",
"minLength": 1,
"examples": [
"vendor/bin/codecept run"
]
}
},
"additionalProperties": false
},
"additional_composer_arguments": {
"type": "array",
"title": "A list of composer arguments",
"description": "A list of required composer arguments which will be added to `composer install` and `composer update` commands.",
"examples": [
[
"--no-scripts",
"--no-plugins"
]
],
"items": {
"type": "string",
"minLength": 1,
"title": "An composer argument",
"description": "Can be either an argument or contain all arguments"
}
}
}
}