This is a minimal example Drupal 10 custom module with automated tests and GitHub Actions integration for CI and code coverage.
- Example functionality in
src/ - PHPUnit tests in
tests/ - CI and coverage badges above
- PHPStan static analysis badge above
Place this module in web/modules/custom/example_module of a Drupal 10 site and enable it.
Tests run automatically on push to the master branch. To run locally:
composer testPHPStan runs automatically in CI. To run locally:
composer analyze