Coverage #262
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: Coverage | |
| on: | |
| pull_request: | |
| push: | |
| branches: ["*"] | |
| schedule: | |
| - cron: "0 8 * * 1" | |
| jobs: | |
| test80: | |
| runs-on: ubuntu-latest | |
| name: PHPUnit | |
| steps: | |
| - name: "Checkout" | |
| uses: "actions/checkout@v4" | |
| - name: "Setup PHP cache environment" | |
| id: "extcache" | |
| uses: "shivammathur/cache-extensions@v1" | |
| with: | |
| php-version: "8.3" | |
| extensions: "pcov" | |
| key: "v1" | |
| - name: "Cache PHP extensions" | |
| uses: "actions/cache@v4" | |
| with: | |
| path: "${{ steps.extcache.outputs.dir }}" | |
| key: "${{ steps.extcache.outputs.key }}" | |
| restore-keys: "${{ steps.extcache.outputs.key }}" | |
| - name: Setup PHP with PCOV | |
| uses: shivammathur/setup-php@v2 | |
| with: | |
| php-version: "8.3" | |
| coverage: "pcov" | |
| - name: "Setup problem matchers for PHP" | |
| shell: "bash" | |
| run: 'echo "::add-matcher::${{ runner.tool_cache }}/php.json"' | |
| - name: "Composer" | |
| run: "composer install --prefer-dist --no-progress --no-suggest" | |
| - name: "Run PHPUnit" | |
| run: "make coverage" | |
| - name: "Upload coverage to Codecov" | |
| uses: codecov/codecov-action@v4 | |
| with: | |
| files: ./coverage.xml | |
| flags: unittests | |
| name: codecov-umbrella | |
| token: ${{ secrets.CODECOV_TOKEN }} | |
| fail_ci_if_error: false |