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
+21-41Lines changed: 21 additions & 41 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -76,20 +76,24 @@ 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) boolean; whether to add `--ignore-platform-req=php` to composer for PHP 8.0. default: true"
93
97
}
94
98
```
95
99
@@ -116,7 +120,9 @@ The package can include a configuration file in its root, `.laminas-ci.json`, wh
116
120
"exclude": [
117
121
{
118
122
}
119
-
]
123
+
],
124
+
"ignore_platform_reqs_8": true,
125
+
"stablePHP": "7.4"
120
126
}
121
127
```
122
128
@@ -130,34 +136,18 @@ Each element in that array should be in the same format as listed above for the
130
136
"name": "(string) Name of the check being run",
131
137
"operatingSystem": "(string) Name of the OS the job should be run on (generally ubuntu-latest)",
132
138
"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)",
139
+
"job": "(string) JSON object detailing the job"
134
140
}
135
141
```
136
142
137
143
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_on_8": "(boolean; OPTIONAL) Whether or not to ignore platform requirements on PHP 8; defaults to true",
155
-
"command": "command to run to perform the check"
156
-
}
157
-
```
144
+
In each case, it MUST have the structure as shown [here](#job-element)**but** the "php" element is mandatory in here and MUST contain
145
+
the minor PHP version to run the check against.
158
146
159
147
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.
160
148
149
+
**If the `checks` element is populated, the matrix will not include any auto-detected checks, and will only output the jobs listed in that element.**
150
+
161
151
### Providing additional checks
162
152
163
153
The `additional_checks` key allows package authors to provide checks to run in addition to any discovered.
@@ -170,24 +160,14 @@ The syntax for the `additional_checks` key is as follows:
170
160
"additional_checks": [
171
161
{
172
162
"name": "(string; REQUIRED) name of the check to run",
173
-
"job": {
174
-
"command": "(string; REQUIRED) command to run",
175
-
"php": "(string; OPTIONAL) PHP version to run on (defaults to stable-php); * indicates all versions",
176
-
"dependencies": "(string; OPTIONAL) dependency set to run on (defaults to locked); * indicates all sets",
177
-
"extensions": [
178
-
"(array of strings; OPTIONAL) specific extensions to install for this check only"
179
-
],
180
-
"ini": [
181
-
"(array of strings; OPTIONAL) specific php.ini settings to use for this check only"
182
-
],
183
-
"ignore_platform_reqs_on_8": "(boolean; OPTIONAL) Whether or not to ignore platform reqs when installing dependencies on PHP 8.0; defaults to true"
184
-
}
163
+
"job": "(object) JSON object detailing the job"
185
164
}
186
165
]
187
166
}
188
167
```
189
168
190
169
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.
170
+
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.
191
171
192
172
The tool discovers checks first, then appends any `additional_checks` are concatenated, and then any `exclude` rules are applied.
0 commit comments