ci: pin integration tests to Cacti 1.2.31 - #776
Conversation
|
Re-verified: branch is up to date with develop (no rebase needed), all 4 Integration Test checks currently pass, no open Copilot review threads. No changes needed. |
9e52218 to
e2b3201
Compare
There was a problem hiding this comment.
Pull request overview
Pins the Cacti repository checkout used by the GitHub Actions integration workflow to the Cacti 1.2.31 release line, and makes several workflow steps resilient when optional tooling/config files are absent in that pinned checkout.
Changes:
- Pin the
actions/checkoutofCacti/cactitorelease/1.2.31. - Make PHPStan config adjustment conditional on
.phpstan.neonexisting. - Guard vendor-bin chmod and optional Composer script steps (
lint,phpcsfixer) so they can be skipped when not defined.
Suppressed comments (1)
.github/workflows/plugin-ci-workflow.yml:215
- Same issue as the lint step:
^ phpcsfixerassumes a specific indentation in Composer output and may skip the step unexpectedly. Match leading whitespace more flexibly and disable ANSI formatting.
if composer run-script --list | grep -qE '^ phpcsfixer'; then
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
| run: sed '/plugins/d' -i .phpstan.neon | ||
| run: | | ||
| if [ -f .phpstan.neon ]; then | ||
| sed '/plugins/d' -i .phpstan.neon |
| - name: Run Linter on base code | ||
| run: composer run-script lint ${{ github.workspace }}/cacti/plugins/thold | ||
| run: | | ||
| if composer run-script --list | grep -qE '^ lint'; then |
|
Live evidence for this one: Cacti
|
Pinning the checkout makes the suite exercise the compatibility contract the plugin declares, but it also means a regression in Cacti develop stops being visible here. One advisory job restores that signal: it builds against develop and is marked continue-on-error, so it reports without turning the plugin's own pull requests red. Signed-off-by: Thomas Vincent <thomasvincent@gmail.com>
2acb899 to
66325f8
Compare
Pins the Cacti checkout used by the integration workflow to
release/1.2.31, so CI exercises the compatibility target the plugin declares (compat = 1.2.25) instead of a moving development branch.The three follow-up commits make the workflow's optional steps conditional. Pinning to a release means
.phpstan.neon,include/vendor/binand thelint/phpcsfixercomposer scripts are not always present, and their absence should skip the step rather than fail the job.Why this matters right now
Every open pull request in this repository is currently red on all four integration jobs, for a reason that has nothing to do with any of them.
cli/install_cacti.phpon Cactidevelopdies before printing anything:Merging this turns them all green, because
release/1.2.31predates that bug. The upstream fix is Cacti/cacti#7751 if you would rather wait for it.Keeping an eye on develop anyway
Pinning has a cost: a regression in Cacti core stops being visible here. So the matrix carries one extra job that builds against
developand is markedcontinue-on-error.It is already earning its keep — that job is red on this very pull request, and for the right reason:
Worth knowing before you merge:
continue-on-errorkeeps the workflow green — the run's conclusion issuccess— but GitHub still renders that one check with a red mark in the pull request UI. The job name says which Cacti it built against, so the distinction is visible, but if a red mark on an advisory job is unwelcome I am happy to move it into its own workflow instead.Rebased on
develop. The Apache PHP package change this branch used to carry belongs to #777, which has since merged.