@@ -197,74 +197,5 @@ jobs:
197197 docker compose run --rm php php -i
198198 docker compose run --rm php locale -a
199199
200- - name : Install WordPress
201- run : npm run env:install
202-
203- - name : Run PHPUnit tests${{ inputs.phpunit-test-groups && format( ' ({0} groups)', inputs.phpunit-test-groups ) || '' }}${{ inputs.coverage-report && ' with coverage report' || '' }}
204- continue-on-error : ${{ inputs.allow-errors }}
205- run : |
206- node ./tools/local-env/scripts/docker.js run \
207- php ./vendor/bin/phpunit \
208- --verbose \
209- -c "${PHPUNIT_CONFIG}" \
210- ${{ inputs.phpunit-test-groups && '--group "${TEST_GROUPS}"' || '' }} \
211- ${{ inputs.coverage-report && '--coverage-clover "wp-code-coverage-${MULTISITE_FLAG}-${GITHUB_SHA}.xml" --coverage-html "wp-code-coverage-${MULTISITE_FLAG}-${GITHUB_SHA}"' || '' }}
212- env :
213- TEST_GROUPS : ${{ inputs.phpunit-test-groups }}
214- MULTISITE_FLAG : ${{ inputs.multisite && 'multisite' || 'single' }}
215-
216- - name : Run AJAX tests
217- if : ${{ ! inputs.phpunit-test-groups && ! inputs.coverage-report }}
218- continue-on-error : ${{ inputs.allow-errors }}
219- run : node ./tools/local-env/scripts/docker.js run php ./vendor/bin/phpunit --verbose -c "${PHPUNIT_CONFIG}" --group ajax
220-
221- - name : Run ms-files tests as a multisite install
222- if : ${{ inputs.multisite && ! inputs.phpunit-test-groups && ! inputs.coverage-report }}
223- continue-on-error : ${{ inputs.allow-errors }}
224- run : node ./tools/local-env/scripts/docker.js run php ./vendor/bin/phpunit --verbose -c "${PHPUNIT_CONFIG}" --group ms-files
225-
226- - name : Run external HTTP tests
227- if : ${{ ! inputs.multisite && ! inputs.phpunit-test-groups && ! inputs.coverage-report }}
228- continue-on-error : ${{ inputs.allow-errors }}
229- run : node ./tools/local-env/scripts/docker.js run php ./vendor/bin/phpunit --verbose -c "${PHPUNIT_CONFIG}" --group external-http
230-
231- # __fakegroup__ is excluded to force PHPUnit to ignore the <exclude> settings in phpunit.xml.dist.
232- - name : Run (Xdebug) tests
233- if : ${{ ! inputs.phpunit-test-groups && ! inputs.coverage-report }}
234- continue-on-error : ${{ inputs.allow-errors }}
235- run : LOCAL_PHP_XDEBUG=true node ./tools/local-env/scripts/docker.js run php ./vendor/bin/phpunit -v --group xdebug --exclude-group __fakegroup__
236-
237- - name : Upload test coverage report to Codecov
238- if : ${{ inputs.coverage-report }}
239- uses : codecov/codecov-action@18283e04ce6e62d37312384ff67231eb8fd56d24 # v5.4.3
240- with :
241- token : ${{ secrets.CODECOV_TOKEN }}
242- files : wp-code-coverage${{ inputs.multisite && '-multisite' || '-single' }}-${{ github.sha }}.xml
243- flags : ${{ inputs.multisite && 'multisite' || 'single' }},php
244- fail_ci_if_error : true
245-
246- - name : Upload HTML coverage report as artifact
247- if : ${{ inputs.coverage-report }}
248- uses : actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
249- with :
250- name : wp-code-coverage${{ inputs.multisite && '-multisite' || '-single' }}-${{ github.sha }}
251- path : wp-code-coverage${{ inputs.multisite && '-multisite' || '-single' }}-${{ github.sha }}
252- overwrite : true
253-
254- - name : Ensure version-controlled files are not modified or deleted
255- run : git diff --exit-code
256-
257- - name : Checkout the WordPress Test Reporter
258- if : ${{ github.ref == 'refs/heads/trunk' && inputs.report }}
259- uses : actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
260- with :
261- repository : ' WordPress/phpunit-test-runner'
262- path : ' test-runner'
263- show-progress : ${{ runner.debug == '1' && 'true' || 'false' }}
264- persist-credentials : false
265-
266- - name : Submit test results to the WordPress.org host test results
267- if : ${{ github.ref == 'refs/heads/trunk' && inputs.report }}
268- env :
269- WPT_REPORT_API_KEY : " ${{ secrets.WPT_REPORT_API_KEY }}"
270- run : docker compose run --rm -e WPT_REPORT_API_KEY -e WPT_PREPARE_DIR=/var/www -e WPT_TEST_DIR=/var/www php php test-runner/report.php
200+ - name : Hello
201+ run : echo Hello
0 commit comments