Skip to content

ci: migrate to reusable PHP CI workflows#40

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

ci: migrate to reusable PHP CI workflows#40
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-validate.yml php-composer-script.yml (composer validate --strict, install-deps: false)
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"], test-script: composer test:unit)
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

  • The new phpunit caller preserves the unit-only behavior of the previous inlined workflow (vendor/bin/phpunit --testsuite unit --testdox); integration / e2e suites need a database and stay out of CI.
  • A follow-up PR to add composer-normalize, conventional-pr-title, and dclint callers is planned separately.

Test plan

  • All reusable-backed checks run and pass on this PR

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-validate, 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.

phpunit caller uses php-tests.yml with php-versions ["8.2"] and test-script "composer test:unit" (preserves the unit-only suite the inlined workflow ran; integration/e2e need a DB and stay out of CI).
@kojiromike kojiromike merged commit aebe186 into main May 12, 2026
7 checks passed
@kojiromike kojiromike deleted the kojiromike/use-reusable-workflows branch May 12, 2026 15:25
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