Changeset 50296 for branches/5.6/.github/workflows/phpunit-tests.yml
- Timestamp:
- 02/12/2021 02:53:59 PM (4 years ago)
- Location:
- branches/5.6
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/5.6
- Property svn:mergeinfo changed
/trunk merged: 49781-49784,49786,49836,49938,50268,50285
- Property svn:mergeinfo changed
-
branches/5.6/.github/workflows/phpunit-tests.yml
r49371 r50296 25 25 # - Cancels all previous workflow runs for pull requests that have not completed. 26 26 # - Checks out the repository. 27 # - Checks out the WordPress Importer plugin (needed for the Core PHPUnit tests).28 27 # - Logs debug information about the runner container. 29 # - Installs NodeJS 1 2 (todo: install the version of NPM specified in the `.nvmrc` file to support older branches).28 # - Installs NodeJS 14. 30 29 # - Sets up caching for NPM. 31 30 # _ Installs NPM dependencies using install-changed to hash the `package.json` file. … … 36 35 name: Setup WordPress 37 36 runs-on: ubuntu-latest 37 if: ${{ github.repository == 'WordPress/wordpress-develop' || github.event_name == 'pull_request' }} 38 38 39 39 steps: … … 46 46 - name: Checkout repository 47 47 uses: actions/checkout@v2 48 49 - name: Checkout the WordPress Importer plugin50 run: svn checkout -r 2387243 https://plugins.svn.wordpress.org/wordpress-importer/trunk/ tests/phpunit/data/plugins/wordpress-importer51 48 52 49 - name: Log debug information … … 66 63 uses: actions/setup-node@v1 67 64 with: 68 node-version: 1 265 node-version: 14 69 66 70 67 - name: Cache NodeJS modules … … 105 102 # - Downloads the built WordPress artifact from the previous job. 106 103 # - Unzips the artifact. 107 # - Installs NodeJS 1 2 (todo: install the version of NPM specified in the `nvmrc` file to support older branches)104 # - Installs NodeJS 14. 108 105 # - Sets up caching for NPM. 109 106 # _ Installs NPM dependencies using install-changed to hash the `package.json` file. … … 119 116 # - Install WordPress within the Docker container. 120 117 # - Run the PHPUnit tests. 121 # - Reports test results to the Distributed Hosting Tests. 118 # - Checks out the WordPress Test reporter repository. 119 # - Reconnect the directory to the Git repository. 120 # - Submit the test results to the WordPress.org host test results. 122 121 # - todo: Configure Slack notifications for failing tests. 123 122 test-php: … … 161 160 uses: actions/setup-node@v1 162 161 with: 163 node-version: 1 2162 node-version: 14 164 163 165 164 - name: Use cached Node modules … … 189 188 with: 190 189 path: ${{ steps.composer-cache.outputs.dir }} 191 key: ${{ runner.os }}- composer-${{ hashFiles('**/composer.lock') }}190 key: ${{ runner.os }}-php-${{ matrix.php }}-composer-${{ hashFiles('**/composer.lock') }} 192 191 restore-keys: | 193 ${{ runner.os }}- composer-192 ${{ runner.os }}-php-${{ matrix.php }}-composer- 194 193 195 194 - name: Install Composer dependencies … … 271 270 run: LOCAL_PHP_XDEBUG=true npm run test:php -- -v --group xdebug --exclude-group __fakegroup__ 272 271 273 - name: WordPress Test Reporter274 if: ${{ matrix.report }}272 - name: Checkout the WordPress Test Reporter 273 if: ${{ github.repository == 'WordPress/wordpress-develop' && github.ref == 'refs/heads/master' && matrix.report }} 275 274 uses: actions/checkout@v2 276 275 with: 277 276 repository: 'WordPress/phpunit-test-runner' 278 277 path: 'test-runner' 279 # TODO: Configure hidden keys to successfully report test results. 280 # 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 278 279 - name: Set up the Git repository 280 if: ${{ github.repository == 'WordPress/wordpress-develop' && github.ref == 'refs/heads/master' && matrix.report }} 281 run: | 282 git init 283 git remote add origin https://github.com/WordPress/wordpress-develop.git 284 git fetch 285 git reset origin/master 286 287 - name: Submit test results to the WordPress.org host test results 288 if: ${{ github.repository == 'WordPress/wordpress-develop' && github.ref == 'refs/heads/master' && matrix.report }} 289 env: 290 WPT_REPORT_API_KEY: "${{ secrets.WPT_REPORT_API_KEY }}" 291 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
Note: See TracChangeset
for help on using the changeset viewer.