Skip to content

ci: adopt org reusable workflows, drop intra-org SHA pin#83

Merged
CybotTM merged 1 commit into
mainfrom
chore/adopt-reusable-workflows
Jun 7, 2026
Merged

ci: adopt org reusable workflows, drop intra-org SHA pin#83
CybotTM merged 1 commit into
mainfrom
chore/adopt-reusable-workflows

Conversation

@CybotTM

@CybotTM CybotTM commented Jun 7, 2026

Copy link
Copy Markdown
Member

What

Migrates this repo's CI to the org's reusable workflows and removes the SHA pin on an intra-org reusable.

  • ci.yml — the code-quality (PHPStan + PHP-CS-Fixer) and coverage (PHPUnit + Codecov) jobs are folded into one netresearch/.github/.github/workflows/php-ci.yml@main caller. The bespoke tests job stays inline — the reusable matrices on PHP version only and cannot express this plugin's PHP × Symfony × Composer × prefer-lowest matrix or the COMPOSER_AUTH/github-oauth network-test env (see ci: clear GitHub auth for the network test step #77).
  • auto-merge-deps.yml — replaces the inlined copy with the reusable auto-merge-deps.yml caller.
  • release.yml — drops the SHA pin on the intra-org reusable (release-composer-package.yml@444271f… # main@main).

Why

Renovate was opening per-repo PRs for things that should be centrally managed:

Closes #80, #81, #82.

Note on the inline tests job

It still pins actions/checkout, setup-php, actions/cache — Renovate will still bump those occasionally. This PR stops the codecov churn and the intra-org SHA pin; it does not (and cannot, without losing the bespoke matrix) eliminate every per-repo action bump.

Validation

yamllint (org config), actionlint, zizmor clean on all three changed files. No intra-org SHA pins and no inline codecov-action remain.

Copilot AI review requested due to automatic review settings June 7, 2026 08:30
@gemini-code-assist

Copy link
Copy Markdown

Note

Gemini is unable to generate a review for this pull request due to the file types involved not being currently supported.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR migrates the repository’s GitHub Actions CI/release automation to Netresearch org-standard reusable workflows, primarily to centralize maintenance (and reduce Renovate churn) while keeping the repo-specific test matrix inline.

Changes:

  • Replaced the inline PHPStan/PHP-CS-Fixer + coverage + Codecov steps with a single call to netresearch/.github’s reusable php-ci.yml.
  • Switched auto-merge automation to the org reusable auto-merge-deps.yml.
  • Updated the release workflow to reference the org reusable workflow by branch ref (@main) instead of a pinned SHA.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.

File Description
.github/workflows/ci.yml Consolidates code-quality and coverage into the org reusable workflow while keeping the bespoke multi-dimensional test matrix inline.
.github/workflows/auto-merge-deps.yml Replaces an inlined bot auto-merge workflow with the org reusable caller.
.github/workflows/release.yml Drops the intra-org reusable SHA pin and tracks the reusable workflow via @main.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread .github/workflows/auto-merge-deps.yml
CybotTM added a commit that referenced this pull request Jun 7, 2026
…uard (#84)

## Problem

`Code Quality` (PHPStan) is **red on `main`** under current dependency
resolution — confirmed by re-running the last-green run
([26959408575](https://github.com/netresearch/composer-agent-skill-plugin/actions/runs/26959408575)).
This is independent of any workflow change; it's no-committed-lockfile
drift.

`CommandContextTrait::resolveContext()` guards `tryComposer()` (Composer
≥2.3) behind `method_exists($this, 'tryComposer')` so the deprecated
`getComposer()` path still works on **Composer 2.2 LTS** — which
`composer.json` explicitly supports (`"composer/composer":
"2.2.*|^2.9"`, and the CI matrix tests 2.2). PHPStan analyses against
the **highest** resolved Composer (2.10.1), where `tryComposer()` always
exists, so it reports `function.alreadyNarrowedType` — **once per
command class** that uses the trait (5 errors). The inline
`@phpstan-ignore-next-line` does not match all per-class trait analyses,
so it stopped suppressing them.

## Fix

- Move the suppression to a **path-scoped `ignoreErrors`** entry in
`phpstan.neon` (identifier `function.alreadyNarrowedType`,
`reportUnmatched: false`) — robust across the trait's per-class
analyses.
- Drop the now-ineffective inline ignore.
- **The runtime guard is unchanged** and still required for the 2.2.*
support path. This is a false-positive suppression, not a weakening —
PHPStan can't see the 2.2 resolution where the method genuinely may be
absent.

## Verification

Local, fresh highest resolution (`composer/composer` 2.10.1, PHPStan
2.2.2, PHP 8.5): **`[OK] No errors`** (was 5 errors before).

## Context

Surfaced while migrating CI to the org reusable `php-ci.yml` (#83) —
that PR's `Checks` job runs PHPStan and inherited this pre-existing
failure. This fix is split out so it stands on its own and unblocks
`main`.
- ci.yml: fold the code-quality + coverage jobs into the org-standard
  php-ci.yml reusable (PHPStan + PHP-CS-Fixer + PHPUnit-with-coverage +
  Codecov). Removes the per-repo codecov-action reference that Renovate
  kept bumping (#81, #82). The bespoke 'tests' job stays inline because
  the reusable matrices on PHP version only and cannot express this
  plugin's Symfony x Composer x prefer-lowest matrix or its network-test
  env.
- auto-merge-deps.yml: replace the inlined copy with the reusable
  auto-merge-deps.yml caller (matches the rest of the org).
- release.yml: drop the SHA pin on the intra-org reusable
  (release-composer-package.yml@<sha> -> @main). Intra-org reusable refs
  must track @main, not a pinned digest (stops Renovate #80).

Signed-off-by: Sebastian Mendel <info@sebastianmendel.de>
@CybotTM CybotTM force-pushed the chore/adopt-reusable-workflows branch from 2c8c992 to 6cb6b76 Compare June 7, 2026 08:48
@sonarqubecloud

sonarqubecloud Bot commented Jun 7, 2026

Copy link
Copy Markdown

Quality Gate Failed Quality Gate failed

Failed conditions
3 Security Hotspots

See analysis details on SonarQube Cloud

@codecov

codecov Bot commented Jun 7, 2026

Copy link
Copy Markdown

Welcome to Codecov 🎉

Once you merge this PR into your default branch, you're all set! Codecov will compare coverage reports and display results in all future pull requests.

Thanks for integrating Codecov - We've got you covered ☂️

@CybotTM CybotTM merged commit 872956e into main Jun 7, 2026
25 of 26 checks passed
@CybotTM CybotTM deleted the chore/adopt-reusable-workflows branch June 7, 2026 08:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants