Skip to content

ci: migrate to reusable PHP CI workflows#36

Merged
kojiromike merged 1 commit into
mainfrom
kojiromike/use-reusable-workflows
May 12, 2026
Merged

ci: migrate to reusable PHP CI workflows#36
kojiromike merged 1 commit into
mainfrom
kojiromike/use-reusable-workflows

Conversation

@kojiromike
Copy link
Copy Markdown
Contributor

Summary

Replace inlined CI workflows with thin callers of openCoreEMR/github-workflows-public@0.0.4, matching the pattern established by openCoreEMR/oce-module-perspectives-scribe#8.

Migrated

Workflow Reusable
actionlint.yml actionlint.yml
composer-normalize.yml php-composer-script.yml (composer normalize --dry-run)
composer-validate.yml php-composer-script.yml (composer validate --strict, install-deps: false)
conventional-pr-title.yml conventional-pr-title.yml
dclint.yml dclint.yml
php-syntax-check.yml php-composer-script.yml (composer php-lint, install-deps: false)
phpcs.yml php-composer-script.yml (composer phpcs)
phpstan.yml php-composer-script.yml (composer phpstan)
phpunit.yml php-tests.yml (php-versions: ["8.2"])
rector.yml php-composer-script.yml (composer rector)

Every php-composer-script caller pins php-version: '8.2' (the reusable's default) so the file is self-documenting. Each caller also adds the paths: filter the github-workflows-public README recommends for that check.

Stayed inlined

  • build-phar.yml, build-phar-on-release.yml — CLI-specific PHAR build, no reusable counterpart yet.
  • release-please.yml — already migrated separately.

Notes / behavior changes

  • phpunit matrix narrowed. The previous inlined workflow ran on PHP 8.2, 8.3, and 8.4. The new caller uses php-versions: '["8.2"]' only, per the migration plan. If you want to preserve the wider matrix, change to '["8.2","8.3","8.4"]' before merge.
  • The composer phpstan script self-installs tools/openemr/vendor (per tools/openemr/README.md), so the reusable's single root composer install plus composer phpstan covers what the previous workflow did with two explicit install steps.

Test plan

  • All reusable-backed checks run and pass on this PR
  • Decide whether to widen phpunit back to 8.2/8.3/8.4 before merge

Replace inlined workflows with thin callers of openCoreEMR/github-workflows-public@0.0.4, matching the pattern established by openCoreEMR/oce-module-perspectives-scribe#8.

Migrated: actionlint, composer-normalize, composer-validate, conventional-pr-title, dclint, php-syntax-check, phpcs, phpstan, phpunit, rector. Each caller pins the reusable to @0.0.4 and adds the path filters recommended by the github-workflows-public README.

Skipped (CLI-specific or already migrated): build-phar.yml, build-phar-on-release.yml, release-please.yml.

NOTE — phpunit matrix narrowed: previously this workflow ran on PHP 8.2/8.3/8.4. The new caller uses php-versions ["8.2"] only, matching the directive in the migration plan. If we want to keep the wider matrix, change php-versions to ["8.2","8.3","8.4"] before merge. composer phpstan still bootstraps tools/openemr/vendor itself, so the reusable does not need a second install step.
@kojiromike kojiromike merged commit faa7a89 into main May 12, 2026
9 checks passed
@kojiromike kojiromike deleted the kojiromike/use-reusable-workflows branch May 12, 2026 15:26
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.

1 participant