You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+25-51Lines changed: 25 additions & 51 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -76,20 +76,25 @@ The "exclude" element will only be present if the package using the action provi
76
76
Each item in the "exclude" array will be an object, with one or more of the keys listed in the "include" objects; when a job matches all elements specified in the "exclude" array, it will be excluded from runs.
77
77
78
78
The "job" element is a string JSON object detailing the job to run.
79
-
Note: it is **not** an object; it is a JSON string.
80
-
It will have the following elements, but is not restricted to them:
79
+
Note: it is **not** an object; it is a JSON string but it MUST have the structure as shown [here](#job-element).
80
+
81
+
### Job Element
82
+
83
+
The "job" element will have the following elements, but is not restricted to them:
81
84
82
85
```json
83
86
{
84
-
"php": "string PHP minor version to run against",
87
+
"php": "(optional) string PHP minor version to run against",
85
88
"extensions": [
86
-
"extension names to install; names are from the ondrej PHP repository, minus the php{VERSION}- prefix",
89
+
"(optional) extension names to install; names are from the ondrej PHP repository, minus the php{VERSION}- prefix"
87
90
],
88
91
"ini": [
89
-
"php.ini directives, one per element; e.g. 'memory_limit=-1'",
92
+
"(optional) php.ini directives, one per element; e.g. 'memory_limit=-1'"
90
93
],
91
-
"dependencies": "dependencies to test against; one of lowest, locked, latest",
92
-
"command": "command to run to perform the check"
94
+
"dependencies": "(optional) dependencies to test against; one of lowest, locked, latest. default: locked",
95
+
"command": "(required) command to run to perform the check",
96
+
"ignore_platform_reqs_8": "(optional; deprecated) boolean; whether to add `--ignore-platform-req=php` to composer for PHP 8.0",
97
+
"ignore_php_platform_requirement": "(optional) boolean; whether to add `--ignore-platform-req=php` to composer for this job."
93
98
}
94
99
```
95
100
@@ -116,7 +121,11 @@ The package can include a configuration file in its root, `.laminas-ci.json`, wh
116
121
"exclude": [
117
122
{
118
123
}
119
-
]
124
+
],
125
+
"ignore_php_platform_requirements": {
126
+
"8.0": true
127
+
},
128
+
"stablePHP": "7.4"
120
129
}
121
130
```
122
131
@@ -130,39 +139,18 @@ Each element in that array should be in the same format as listed above for the
130
139
"name": "(string) Name of the check being run",
131
140
"operatingSystem": "(string) Name of the OS the job should be run on (generally ubuntu-latest)",
132
141
"action": "(string) GHA to run the step on; currently ignored, as GHA does not support dynamic action selection",
133
-
"job": "(string) JSON object detailing the job (more on this later)",
142
+
"job": "(string) JSON object detailing the job"
134
143
}
135
144
```
136
145
137
146
The "job" element can either be a JSON string representing a job, or an object.
138
-
In each case, it MUST have the structure as noted above:
139
-
140
-
```json
141
-
{
142
-
"php": "(string; REQUIRED) PHP minor version to run against",
143
-
"extensions": [
144
-
"OPTIONAL array of strings",
145
-
"Each element represents an extension to install",
146
-
"Names are from the Sury PHP repository, minus the php{VERSION}- prefix"
147
-
],
148
-
"ini": [
149
-
"OPTIONAL array of strings",
150
-
"Each element respresents one php.ini directive",
151
-
"e.g. 'memory_limit=-1'"
152
-
],
153
-
"dependencies": "dependencies to test against; one of lowest, locked, latest",
154
-
"ignore_platform_reqs_8": "(boolean; OPTIONAL; DEPRECATED) Whether or not to ignore platform requirements on PHP 8; defaults to true",
155
-
"ignore_platform_reqs": {
156
-
"8.0": true,
157
-
"8.1": true,
158
-
"(object; OPTIONAL) Whether or not to ignore platform requirements for specific PHP versions; defaults to true for PHP 8 & PHP 8.1": false
159
-
},
160
-
"command": "command to run to perform the check"
161
-
}
162
-
```
147
+
In each case, it MUST have the structure as shown [here](#job-element)**but** the "php" element is mandatory in here and MUST contain
148
+
the minor PHP version to run the check against.
163
149
164
150
The action validates each check and its job to ensure it is structured correctly, and will provide warnings if not, omitting any check that is malformed from the output.
165
151
152
+
**If specific checks are provided by a project, the matrix won't contain any auto-detected checks and will only output these checks.**
153
+
166
154
### Providing additional checks
167
155
168
156
The `additional_checks` key allows package authors to provide checks to run in addition to any discovered.
@@ -175,29 +163,15 @@ The syntax for the `additional_checks` key is as follows:
175
163
"additional_checks": [
176
164
{
177
165
"name": "(string; REQUIRED) name of the check to run",
178
-
"job": {
179
-
"command": "(string; REQUIRED) command to run",
180
-
"php": "(string; OPTIONAL) PHP version to run on (defaults to stable-php); * indicates all versions",
181
-
"dependencies": "(string; OPTIONAL) dependency set to run on (defaults to locked); * indicates all sets",
182
-
"extensions": [
183
-
"(array of strings; OPTIONAL) specific extensions to install for this check only"
184
-
],
185
-
"ini": [
186
-
"(array of strings; OPTIONAL) specific php.ini settings to use for this check only"
187
-
],
188
-
"ignore_platform_reqs_8": "(boolean; OPTIONAL; DEPRECATED) Whether or not to ignore platform reqs when installing dependencies on PHP 8.0; defaults to true",
189
-
"ignore_platform_reqs": {
190
-
"8.0": true,
191
-
"8.1": true,
192
-
"(object; OPTIONAL) Whether or not to ignore platform requirements for specific PHP versions; defaults to true for PHP 8 & PHP 8.1": false
193
-
}
194
-
}
166
+
"job": "(object) JSON object detailing the job"
195
167
}
196
168
]
197
169
}
198
170
```
199
171
200
172
A job per PHP version per dependency set will be created, and the "name" will be appended with "on PHP {VERSION} with {DEPS} dependencies" during an actual run.
173
+
The "job" element MUST have the structure as shown [here](#job-element)**but** the "php" element is mandatory in here and MUST contain either the minor PHP version to run the check against or a wildcard `*` to run the against **all** supported PHP versions.
174
+
In case that the "php" version is passed as a wildcard `*`, the `ignore_php_platform_requirement` element will be ignored. It is possible to provide per-version flags by adding the `ignore_php_platform_requirements` element instead.
201
175
202
176
The tool discovers checks first, then appends any `additional_checks` are concatenated, and then any `exclude` rules are applied.
0 commit comments