File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 8282
8383env :
8484 LOCAL_PHP : ${{ inputs.php }}-fpm
85- LOCAL_PHP_XDEBUG : ${{ inputs.coverage-report || false }}
86- LOCAL_PHP_XDEBUG_MODE : ${{ inputs.coverage-report && 'coverage' || ' develop,debug' }}
85+ LOCAL_PHP_XDEBUG : false
86+ LOCAL_PHP_XDEBUG_MODE : ' develop,debug'
8787 LOCAL_DB_TYPE : ${{ inputs.db-type }}
8888 LOCAL_DB_VERSION : ${{ inputs.db-version }}
8989 LOCAL_PHP_MEMCACHED : ${{ inputs.memcached }}
@@ -201,10 +201,21 @@ jobs:
201201 - name : Install WordPress
202202 run : npm run env:install
203203
204+ - name : Install PCOV coverage driver
205+ if : ${{ inputs.coverage-report }}
206+ run : |
207+ docker compose exec -T -u 0 php sh -c '
208+ apt-get update -qq &&
209+ apt-get install -y -qq --no-install-recommends $PHPIZE_DEPS &&
210+ pecl install pcov &&
211+ docker-php-ext-enable pcov &&
212+ php -m | grep -i pcov
213+ '
214+
204215 - name : Run PHPUnit tests${{ inputs.phpunit-test-groups && format( ' ({0} groups)', inputs.phpunit-test-groups ) || '' }}${{ inputs.coverage-report && ' with coverage report' || '' }}
205216 continue-on-error : ${{ inputs.allow-errors }}
206217 run : |
207- node ./tools/local-env/scripts/docker.js run \
218+ node ./tools/local-env/scripts/docker.js ${{ inputs.coverage-report && 'exec' || ' run' }} \
208219 php ./vendor/bin/phpunit \
209220 --verbose \
210221 -c "${PHPUNIT_CONFIG}" \
Original file line number Diff line number Diff line change @@ -38,8 +38,6 @@ concurrency:
3838permissions : {}
3939
4040env :
41- LOCAL_PHP_XDEBUG : true
42- LOCAL_PHP_XDEBUG_MODE : ' coverage'
4341 LOCAL_PHP_MEMCACHED : ${{ false }}
4442 PUPPETEER_SKIP_DOWNLOAD : ${{ true }}
4543
5250 uses : ./.github/workflows/reusable-phpunit-tests-v3.yml
5351 permissions :
5452 contents : read
55- if : ${{ github.repository == 'WordPress/wordpress-develop' }}
53+ # if: ${{ github.repository == 'WordPress/wordpress-develop' }}
5654 strategy :
5755 fail-fast : false
5856 matrix :
You can’t perform that action at this time.
0 commit comments