Skip to content

Conversation

@tangrufus
Copy link
Member

No description provided.

Copilot AI review requested due to automatic review settings October 26, 2025 17:28
@tangrufus tangrufus added the test label Oct 26, 2025
Copy link

Copilot AI left a 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",
Copy link

Copilot AI Oct 26, 2025

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.

Copilot uses AI. Check for mistakes.
Comment on lines +62 to 71
- 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' || '' }}

Copy link

Copilot AI Oct 26, 2025

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.

Suggested change
- 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

Copilot uses AI. Check for mistakes.
@tangrufus tangrufus merged commit 870f19d into typisttech:main Oct 26, 2025
13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Development

Successfully merging this pull request may close these issues.

1 participant