Repository navigation
ci: add an always-running PHP tests result check - #4934
Conversation
The PHP test matrix jobs are never created when the tests job is skipped on a pull request without PHP changes, so requiring them blocks frontend-only PRs. The new job passes when the tests passed or were skipped because no PHP changed, and fails otherwise, including a skip after a failed prerequisite. Branch protection should require it instead of the matrix jobs.
Walkthrough
Merge Risk:
|
There was a problem hiding this comment.
Actionable comments posted: 2

Review info
-
Run configuration-
- Source mode: Auto
- Repository: Unavailable
- Branch: Unavailable
- File: No configuration file from this repository applied
- Commit: Unavailable
- Layers: Organization UI
- Review profile: CHILL
- Plan: Advanced
- Run ID:
4c73d947-f23b-4d85-b001-8e9299bcc887
Files selected for processing: 2-
.github/workflows/CICD.ymldocs/specs/5-operations/quality-gate.md
Included review availability: This review used your included allowance. Your plan provides up to 8 included reviews per hour; 7 remain after this review.
-
Drop the Markdown paths-ignore from the pull_request trigger so the required checks also report on Markdown-only pull requests. Add bootstrap, public and tests PHP files and php_tests.yml to the php filter so changes to them run the PHP tests instead of passing the result check on a skip.
There was a problem hiding this comment.
Caution
Some comments are outside the diff and can’t be posted inline due to GitHub limitations.

Major · Reject skipped tests after a failed prerequisite. · CICD.yml:241-243
.github/workflows/CICD.yml:241-243
Major · Functional Correctness · Quick win Reject skipped tests after a failed prerequisite.
On a pull request that changes only
lang/**,php_syntax_errorsstill runs. If it fails,testsis skipped.TESTS_EXPECTEDremainsfalse, so this branch exits successfully and marks1️⃣ PHP tests resultas passed. This violates the documented rule that a skipped test after a failed prerequisite must fail. (raw.githubusercontent.com)Add
php_syntax_errorstotests_result.needs. Accept this skip only when that prerequisite issuccessor intentionallyskipped.

Review info
-
Run configuration-
- Source mode: Auto
- Repository: Unavailable
- Branch: Unavailable
- File: No configuration file from this repository applied
- Commit: Unavailable
- Layers: Organization UI
- Review profile: CHILL
- Plan: Advanced
- Run ID:
3989f2a0-a0a4-4519-aa8a-13e4542e10da
Files selected for processing: 2-
.github/workflows/CICD.ymldocs/specs/5-operations/quality-gate.md
Included review availability: This review used your included allowance. Your plan provides up to 8 included reviews per hour; 6 remain after this review.
-
That is not a problem because in those case we override the requirement. The php tests take about 1h20 to run. We do not want to wait for those when the changes are only front-end. The issue is the inflexibility of the tests requirements in Github to be able to say which tests are required depending of which paths. :( |
|
Sorry, the description wasn't clear: this does not run the PHP tests on front-end-only PRs. The 1h20 matrix still only runs when the It is meant as a workaround for the path-dependent requirement you mention. GitHub can't require checks per path, but it can require one check that always reports and whose own logic is path-aware. If
The second commit (from review) has two side effects worth knowing about:
I'm happy to drop either of these. And if you'd rather keep overriding, feel free to close this. |
|
Hooo nice! |
The PHP test matrix jobs are never created when the tests job is skipped on a pull request without PHP changes, so requiring them blocks frontend-only PRs. The new job passes when the tests passed or were skipped because no PHP changed, and fails otherwise, including a skip after a failed prerequisite. Branch protection should require it instead of the matrix jobs.
Summary by CodeRabbit
Chores
Documentation