Make WordPress Core


Ignore:
Timestamp:
09/21/2021 07:28:47 PM (4 years ago)
Author:
desrosj
Message:

Build/Test Tools: Introduce the PHPUnit Polyfills package for easier cross branch testing.

This backports the PHPUnit Polyfills package and related test infrastructure changes to make it easier for developers to continue testing on multiple versions WordPress while adding tests for newer versions of PHP, which require more modern PHPUnit practices.

One of the changes included is the addition of wrappers for the new snake_case fixture methods in PHPUnit. This allows the native camelCase standard in PHPUnit to be used, but allows for developers to transition to the new naming conventions.

Props hellofromTonya, jrf, SergeyBiryukov, johnbillion, netweb, schlessera, jeherve, lucatume, desrosj.
Merges [51559,51560,51810-51813,51828] to the 5.7 branch.
See #53911.

Location:
branches/5.7
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/5.7

  • branches/5.7/.github/workflows/test-coverage.yml

    r50601 r51839  
    1919env:
    2020  PUPPETEER_SKIP_CHROMIUM_DOWNLOAD: ${{ true }}
    21   COMPOSER_INSTALL: ${{ false }}
    2221  # Controls which NPM script to use for running PHPUnit tests. Options ar `php` and `php-composer`.
    2322  PHPUNIT_SCRIPT: php
     
    9695        run: npm ci
    9796
     97      - name: Get composer cache directory
     98        id: composer-cache
     99        run: echo "::set-output name=dir::$(composer config cache-files-dir)"
     100
     101      - name: Cache Composer dependencies
     102        uses: actions/cache@26968a09c0ea4f3e233fdddbafd1166051a095f6 # v2.1.4
     103        env:
     104          cache-name: cache-composer-dependencies
     105        with:
     106          path: ${{ steps.composer-cache.outputs.dir }}
     107          key: ${{ runner.os }}-php-${{ matrix.php }}-composer-${{ hashFiles('**/composer.lock') }}
     108
     109      - name: Install Composer dependencies
     110        run: |
     111          docker-compose run --rm php composer --version
     112          docker-compose run --rm php composer install
     113
    98114      - name: Docker debug information
    99115        run: |
Note: See TracChangeset for help on using the changeset viewer.