Make WordPress Core

Changeset 63786


Ignore:
Timestamp:
09/21/2026 08:54:12 PM (8 hours ago)
Author:
lancewillett
Message:

Build/Test Tools: Support grouped tests on older PHPUnit.

Only pass --fail-on-empty-test-suite on PHP 7.3 and newer, where the supported PHPUnit versions recognize it. Preserve group selection on older versions so release branches using the shared workflow can run their tests.

Keep empty-suite protection for the Core assets job and other grouped runs on supported PHPUnit versions.

Developed in: https://github.com/WordPress/wordpress-develop/pull/13641

Props lancewillett, adrianmoldovanwp.
See #65889.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/.github/workflows/reusable-phpunit-tests-v3.yml

    r63782 r63786  
    323323        run: node ./tools/local-env/scripts/docker.js run php ./vendor/bin/phpunit --verbose -c "${PHPUNIT_CONFIG}" --group external-http
    324324
     325      # PHPUnit versions used below PHP 7.3 do not support --fail-on-empty-test-suite.
    325326      - name: Run PHPUnit tests${{ inputs.phpunit-test-groups && format( ' ({0} groups)', inputs.phpunit-test-groups ) || '' }}${{ inputs.coverage-report && ' with coverage report' || '' }}
    326327        continue-on-error: ${{ inputs.allow-errors }}
     
    330331            --verbose \
    331332            -c "${PHPUNIT_CONFIG}" \
    332             ${{ inputs.phpunit-test-groups && '--group "${TEST_GROUPS}" --fail-on-empty-test-suite' || '' }} \
     333            ${{ inputs.phpunit-test-groups && '--group "${TEST_GROUPS}"' || '' }} \
     334            ${{ inputs.phpunit-test-groups && inputs.php >= '7.3' && '--fail-on-empty-test-suite' || '' }} \
    333335            ${{ inputs.coverage-report && '--coverage-clover "wp-code-coverage-${MULTISITE_FLAG}-${GITHUB_SHA}.xml"' || '' }}
    334336        env:
Note: See TracChangeset for help on using the changeset viewer.