Build/Test Tools: Enable reporting of results to WordPress.org.

This configures reporting of the test results to the WordPress.org Host Test Results in the new GitHub Actions workflow for PHPUnit testing.

See https://make.wordpress.org/hosting/test-results/

Props mikeschroder, dd32.
See #50401.

git-svn-id: https://develop.svn.wordpress.org/trunk@49783 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Jonathan Desrosiers
2020-12-10 14:18:12 +00:00
parent 2a46c3987f
commit e86d912e3c

View File

@@ -272,10 +272,14 @@ jobs:
run: LOCAL_PHP_XDEBUG=true npm run test:php -- -v --group xdebug --exclude-group __fakegroup__
- name: WordPress Test Reporter
if: ${{ matrix.report }}
if: ${{ github.repository == 'WordPress/wordpress-develop' && github.ref == 'refs/heads/master' && matrix.report }}
uses: actions/checkout@v2
with:
repository: 'WordPress/phpunit-test-runner'
path: 'test-runner'
# TODO: Configure hidden keys to successfully report test results.
# 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
- name: WordPress Test Reporter
if: ${{ github.repository == 'WordPress/wordpress-develop' && github.ref == 'refs/heads/master' && matrix.report }}
env:
WPT_REPORT_API_KEY: ${{ secrets.WPT_REPORT_API_KEY }}
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