Commit c558283
committed
GH Actions: fix cs annotations not showing
As things are, the CS check for the PHPCS codebase is run in the `test` workflow as an integration test and will show inline annotations about code style issues in PRs. These annotations are intended to help contributors identify issues with their PR.
As the `test` workflow is run against a large range of PHP versions and OSes, this showing of the annotations was limited to PHP 8.4 + Ubuntu to prevent the contributor seeing a wall of duplicate annotations when issues would be found (one for each test build).
However, the `test` workflow also uses the "fail-fast" option, cancelling the builds on the first failure, which means the PHP 8.4/Ubuntu build may have been cancelled before it was run, in which case, the inline CS annotations don't show at all.
This means the current setup is counter-productive as in most cases, PR annotations will not show, even when they should be shown.
This commit intends to fix this by adding a separate CS run against PHP "latest" to the `validate` workflow.
This CS run in the `validate` workflow will now trigger the showing of annotations, and as this job is stand-alone, will not be subject to cancellation due to other builds failing.
The code related to showing the annotations has been removed from the `test` workflow.
Yes, this does mean the CS check will have a semi-duplicated run in the `test` workflow.
I do not see this as a problem as:
1. The _intention_ behind that run is different ("integration test" vs "cs check").
2. The CS run in the `test` workflow is run with different settings - `--no-cache --parallel=1` -, meaning more variations of PHPCS CLI args are tested.1 parent 2c79c90 commit c558283
2 files changed
+27
-9
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
195 | 195 | | |
196 | 196 | | |
197 | 197 | | |
198 | | - | |
199 | 198 | | |
200 | 199 | | |
201 | 200 | | |
| |||
240 | 239 | | |
241 | 240 | | |
242 | 241 | | |
243 | | - | |
244 | | - | |
245 | | - | |
246 | | - | |
247 | | - | |
248 | | - | |
249 | | - | |
250 | | - | |
| 242 | + | |
251 | 243 | | |
252 | 244 | | |
253 | 245 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
17 | 17 | | |
18 | 18 | | |
19 | 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 | + | |
20 | 46 | | |
21 | 47 | | |
22 | 48 | | |
| |||
0 commit comments