Repository navigation
add Clover PHP logo #5
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Code Coverage | |
| on: | |
| push: | |
| branches: [main] | |
| pull_request: | |
| branches: [main] | |
| jobs: | |
| pest: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| php-version: ['8.3', '8.4'] # test multiple PHP versions | |
| dependencies: [lowest, highest] | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Setup PHP | |
| uses: shivammathur/setup-php@v2 | |
| with: | |
| php-version: ${{ matrix.php-version }} | |
| extensions: xdebug, pcov | |
| coverage: pcov | |
| tools: composer, pecl | |
| ini-values: | | |
| memory_limit=2G | |
| error_reporting=E_ALL | |
| display_errors=1 | |
| - name: Install Composer dependencies | |
| run: composer install --no-progress --no-interaction | |
| - name: Verify PHP extensions | |
| run: php -m | grep -E 'xdebug|pcov' | |
| - name: Run Pest with coverage | |
| run: | | |
| echo "Using PCOV for coverage..." | |
| php -d pcov.enabled=1 vendor/bin/pest --coverage --colors=never | |
| - name: Upload coverage report | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: pest-coverage-${{ matrix.php-version }} | |
| path: coverage/ |