Summary
Expand CI so pull requests are validated with static analysis and formatting checks in addition to the current test suite.
Why
The package already defines local Composer scripts for:
composer test
composer analyse
composer format
But the current GitHub Actions workflow only runs Pest. That means PRs can still merge with PHPStan/Larastan issues or formatting drift even though those checks are already part of the local development workflow.
CI should reflect the quality bar the project expects locally.
Current Implementation Notes
Relevant files:
.github/workflows/tests.yml
composer.json
Current workflow behavior:
- runs on pushes and pull requests to
main
- tests PHP
8.3 and 8.4
- installs dependencies
- runs
vendor/bin/pest --ci
Current Composer scripts:
analyse: vendor/bin/phpstan analyse
test: vendor/bin/pest
format: vendor/bin/pint
Proposed Scope
Expand CI to include:
Static analysis
- run the existing analysis command in CI
- fail the workflow on PHPStan/Larastan errors
Formatting
- run Pint in check mode rather than write mode
- fail the workflow if formatting drift is present
Workflow structure
- decide whether to keep one combined workflow or split checks into separate jobs
- keep the workflow readable and reasonably fast
- make sure the commands match the project's Composer scripts where practical
Acceptance Criteria
- CI validates tests, static analysis, and formatting
- pull requests fail when analysis or formatting checks fail
- the workflow remains understandable and maintainable
- CI behavior matches the project's documented local workflow
Nice To Have
- use Composer script entry points in CI for consistency
- surface job names clearly, for example
tests, analysis, and format
- consider dependency caching if CI time starts to grow
Summary
Expand CI so pull requests are validated with static analysis and formatting checks in addition to the current test suite.
Why
The package already defines local Composer scripts for:
composer testcomposer analysecomposer formatBut the current GitHub Actions workflow only runs Pest. That means PRs can still merge with PHPStan/Larastan issues or formatting drift even though those checks are already part of the local development workflow.
CI should reflect the quality bar the project expects locally.
Current Implementation Notes
Relevant files:
.github/workflows/tests.ymlcomposer.jsonCurrent workflow behavior:
main8.3and8.4vendor/bin/pest --ciCurrent Composer scripts:
analyse:vendor/bin/phpstan analysetest:vendor/bin/pestformat:vendor/bin/pintProposed Scope
Expand CI to include:
Static analysis
Formatting
Workflow structure
Acceptance Criteria
Nice To Have
tests,analysis, andformat