Skip to content

Commit 99031f9

Browse files
Merge pull request #47 from boesing/docs/add-missing-details
Update README to reflect actual features
2 parents 8064c7e + c4e9c52 commit 99031f9

File tree

1 file changed

+21
-41
lines changed

1 file changed

+21
-41
lines changed

README.md

Lines changed: 21 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -76,20 +76,24 @@ The "exclude" element will only be present if the package using the action provi
7676
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.
7777

7878
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:
8184

8285
```json
8386
{
84-
"php": "string PHP minor version to run against",
87+
"php": "(optional) string PHP minor version to run against",
8588
"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"
8790
],
8891
"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'"
9093
],
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"
9397
}
9498
```
9599

@@ -116,7 +120,9 @@ The package can include a configuration file in its root, `.laminas-ci.json`, wh
116120
"exclude": [
117121
{
118122
}
119-
]
123+
],
124+
"ignore_platform_reqs_8": true,
125+
"stablePHP": "7.4"
120126
}
121127
```
122128

@@ -130,34 +136,18 @@ Each element in that array should be in the same format as listed above for the
130136
"name": "(string) Name of the check being run",
131137
"operatingSystem": "(string) Name of the OS the job should be run on (generally ubuntu-latest)",
132138
"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"
134140
}
135141
```
136142

137143
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.
158146

159147
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.
160148

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+
161151
### Providing additional checks
162152

163153
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:
170160
"additional_checks": [
171161
{
172162
"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"
185164
}
186165
]
187166
}
188167
```
189168

190169
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.
191171

192172
The tool discovers checks first, then appends any `additional_checks` are concatenated, and then any `exclude` rules are applied.
193173

0 commit comments

Comments
 (0)