Make WordPress Core


Ignore:
Timestamp:
09/21/2021 07:04:34 PM (3 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.8 branch.
See #53911.

Location:
branches/5.8
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/5.8

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

    r51357 r51838  
    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
     
    9897        run: npm ci
    9998
     99      - name: Get composer cache directory
     100        id: composer-cache
     101        run: echo "::set-output name=dir::$(composer config cache-files-dir)"
     102
     103      - name: Cache Composer dependencies
     104        uses: actions/cache@26968a09c0ea4f3e233fdddbafd1166051a095f6 # v2.1.4
     105        env:
     106          cache-name: cache-composer-dependencies
     107        with:
     108          path: ${{ steps.composer-cache.outputs.dir }}
     109          key: ${{ runner.os }}-php-${{ matrix.php }}-composer-${{ hashFiles('**/composer.lock') }}
     110
     111      - name: Install Composer dependencies
     112        run: |
     113          docker-compose run --rm php composer --version
     114          docker-compose run --rm php composer install
     115
    100116      - name: Docker debug information
    101117        run: |
Note: See TracChangeset for help on using the changeset viewer.