-
-
Notifications
You must be signed in to change notification settings - Fork 0
Update Pest to v4 #28
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
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 updates the project's testing framework from Pest v3 to v4, with accompanying configuration adjustments and workflow improvements.
Key Changes:
- Upgraded Pest dependency from ^3.5 to ^4.1
- Updated PHPUnit configuration to align with newer conventions
- Enhanced CI workflow to collect separate coverage reports for unit, feature, and e2e tests
Reviewed Changes
Copilot reviewed 4 out of 8 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| composer.json | Updated Pest version to ^4.1, adjusted fixture paths to use capitalized 'Fixtures' directory, streamlined test scripts |
| phpunit.xml | Modernized configuration by using vendor-relative schema path and removing suffix restrictions |
| tests/Feature/TestCase.php | Refactored to use fixture() helper instead of constant array for feed paths |
| .github/workflows/test.yml | Improved coverage collection with separate reports for each test suite and dynamic coverage flag handling |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| "curl -o ./tests/Fixtures/vulnerabilities.production.json https://www.wordfence.com/api/intelligence/v2/vulnerabilities/production", | ||
| "curl -o ./tests/Fixtures/vulnerabilities.scanner.json https://www.wordfence.com/api/intelligence/v2/vulnerabilities/scanner" | ||
| ], | ||
| "pest": "pest -d memory_limit=512M", |
Copilot
AI
Oct 26, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The new 'pest' script duplicates the memory limit configuration that's already present in 'pest:feature'. The memory limit change from 640M to 512M should be documented or reconsidered, as this represents a ~20% reduction in available memory that could impact test execution.
| - run: composer pest:unit -- ${COVERAGE} --ci | ||
| env: | ||
| COVERAGE: ${{ matrix.coverage == 'xdebug' && '--coverage-clover coverage-unit.xml' || '' }} | ||
| - run: composer pest:feature -- ${COVERAGE} --ci | ||
| env: | ||
| COVERAGE: ${{ matrix.coverage == 'xdebug' && '--coverage-clover coverage-feature.xml' || '' }} | ||
| - run: composer pest:e2e -- ${COVERAGE} --ci | ||
| env: | ||
| COVERAGE: ${{ matrix.coverage == 'xdebug' && '--coverage-clover coverage-e2e.xml' || '' }} | ||
|
|
Copilot
AI
Oct 26, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The shell variable expansion syntax ${COVERAGE} may not work correctly in GitHub Actions depending on the shell context. Consider using GitHub Actions expression syntax directly in the run command or ensure the shell is explicitly set to bash.
| - run: composer pest:unit -- ${COVERAGE} --ci | |
| env: | |
| COVERAGE: ${{ matrix.coverage == 'xdebug' && '--coverage-clover coverage-unit.xml' || '' }} | |
| - run: composer pest:feature -- ${COVERAGE} --ci | |
| env: | |
| COVERAGE: ${{ matrix.coverage == 'xdebug' && '--coverage-clover coverage-feature.xml' || '' }} | |
| - run: composer pest:e2e -- ${COVERAGE} --ci | |
| env: | |
| COVERAGE: ${{ matrix.coverage == 'xdebug' && '--coverage-clover coverage-e2e.xml' || '' }} | |
| - run: composer pest:unit -- ${{ matrix.coverage == 'xdebug' && '--coverage-clover coverage-unit.xml' || '' }} --ci | |
| - run: composer pest:feature -- ${{ matrix.coverage == 'xdebug' && '--coverage-clover coverage-feature.xml' || '' }} --ci | |
| - run: composer pest:e2e -- ${{ matrix.coverage == 'xdebug' && '--coverage-clover coverage-e2e.xml' || '' }} --ci |
No description provided.