Fix #1234: optimize once the client side sub sizes have arrived #711
Workflow file for this run
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: PHPUnit Code Coverage | |
| on: | |
| pull_request: | |
| workflow_dispatch: | |
| # Cancel all previous workflow runs for the same branch that have not yet completed. | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} | |
| cancel-in-progress: true | |
| permissions: | |
| contents: read | |
| jobs: | |
| run: | |
| runs-on: ${{ matrix.operating-system }} | |
| timeout-minutes: 30 | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| operating-system: [ubuntu-latest] | |
| php-versions: ['7.4'] | |
| wp-versions: ['latest'] | |
| name: Code Coverage. | |
| env: | |
| IMAGIFY_TESTS_API_KEY: ${{ secrets.IMAGIFY_TESTS_API_KEY }} | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | |
| - name: Setup PHP + Composer | |
| uses: wp-media/workflows/.github/actions/setup-php-composer@main | |
| with: | |
| php-version: ${{ matrix.php-versions }} | |
| coverage: xdebug | |
| # Empty overrides the action's `--no-scripts` default so Composer runs | |
| # post-install/update scripts, i.e. Strauss namespace prefixing, which the | |
| # covered unit suite needs to autoload the Imagify\Dependencies\* classes. | |
| composer-options: '' | |
| # Registered here, not in the composite action: GitHub removes problem | |
| # matchers added inside a composite action when it finishes, so they must | |
| # be added in the caller to stay active for the test steps below. | |
| - name: Setup problem matchers for PHP | |
| run: echo "::add-matcher::${{ runner.tool_cache }}/php.json" | |
| - name: Setup problem matchers for PHPUnit | |
| run: echo "::add-matcher::${{ runner.tool_cache }}/phpunit.json" | |
| - name: Code Coverage | |
| run: composer code-coverage | |
| - name: Run codacy-coverage-reporter | |
| uses: codacy/codacy-coverage-reporter-action@89d6c85cfafaec52c72b6c5e8b2878d33104c699 # v1.3.0 | |
| with: | |
| project-token: ${{ secrets.CODACY_PROJECT_TOKEN }} | |
| coverage-reports: tests/report/coverage.clover |