mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-03-31 02:34:38 +00:00
General: Increase the minimum supported version of PHP to 7.0.0.
This also removes the random compat library which is no longer necessary, and adjusts unit tests and CI workflows that no longer need to take PHP 5.6 into account. Thank you for your service, PHP 5. Onwards! Props SergeyBiryukov, mukesh27, dingo_d, audrasjb, jrf, costdev, azaozz, JavierCasares, hellofromTonya, samiamnot, spacedmonkey, masteradhoc, knutsp, garyjones, chanthaboune Fixes #57345 git-svn-id: https://develop.svn.wordpress.org/trunk@56141 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
36
.github/workflows/phpunit-tests.yml
vendored
36
.github/workflows/phpunit-tests.yml
vendored
@@ -33,7 +33,6 @@ permissions: {}
|
||||
env:
|
||||
PUPPETEER_SKIP_CHROMIUM_DOWNLOAD: ${{ true }}
|
||||
LOCAL_PHP_MEMCACHED: ${{ false }}
|
||||
SLOW_TESTS: 'external-http,media,restapi'
|
||||
|
||||
jobs:
|
||||
# Runs the PHPUnit tests for WordPress.
|
||||
@@ -56,7 +55,7 @@ jobs:
|
||||
# - Checks out the WordPress Test reporter repository.
|
||||
# - Submit the test results to the WordPress.org host test results.
|
||||
test-php:
|
||||
name: ${{ matrix.php }}${{ matrix.multisite && ' multisite' || '' }}${{ matrix.split_slow && ' slow tests' || '' }}${{ matrix.memcached && ' with memcached' || '' }} on ${{ matrix.os }}
|
||||
name: ${{ matrix.php }}${{ matrix.multisite && ' multisite' || '' }}${{ matrix.memcached && ' with memcached' || '' }} on ${{ matrix.os }}
|
||||
runs-on: ${{ matrix.os }}
|
||||
permissions:
|
||||
contents: read
|
||||
@@ -65,23 +64,11 @@ jobs:
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
php: [ '5.6', '7.0', '7.1', '7.2', '7.3', '7.4', '8.0', '8.1', '8.2' ]
|
||||
php: [ '7.0', '7.1', '7.2', '7.3', '7.4', '8.0', '8.1', '8.2' ]
|
||||
os: [ ubuntu-latest ]
|
||||
memcached: [ false ]
|
||||
split_slow: [ false ]
|
||||
multisite: [ false, true ]
|
||||
include:
|
||||
# Additional "slow" jobs for PHP 5.6.
|
||||
- php: '5.6'
|
||||
os: ubuntu-latest
|
||||
memcached: false
|
||||
multisite: false
|
||||
split_slow: true
|
||||
- php: '5.6'
|
||||
os: ubuntu-latest
|
||||
memcached: false
|
||||
multisite: true
|
||||
split_slow: true
|
||||
# Include jobs for PHP 7.4 with memcached.
|
||||
- php: '7.4'
|
||||
os: ubuntu-latest
|
||||
@@ -174,37 +161,22 @@ jobs:
|
||||
- name: Install WordPress
|
||||
run: npm run env:install
|
||||
|
||||
- name: Run slow PHPUnit tests
|
||||
if: ${{ matrix.split_slow }}
|
||||
run: node ./tools/local-env/scripts/docker.js run php ./vendor/bin/phpunit --verbose -c ${{ env.PHPUNIT_CONFIG }} --group ${{ env.SLOW_TESTS }}
|
||||
|
||||
- name: Run PHPUnit tests for single site excluding slow tests
|
||||
if: ${{ matrix.php < '7.0' && ! matrix.split_slow && ! matrix.multisite }}
|
||||
run: node ./tools/local-env/scripts/docker.js run php ./vendor/bin/phpunit --verbose -c ${{ env.PHPUNIT_CONFIG }} --exclude-group ${{ env.SLOW_TESTS }},ajax,ms-files,ms-required
|
||||
|
||||
- name: Run PHPUnit tests for Multisite excluding slow tests
|
||||
if: ${{ matrix.php < '7.0' && ! matrix.split_slow && matrix.multisite }}
|
||||
run: node ./tools/local-env/scripts/docker.js run php ./vendor/bin/phpunit --verbose -c ${{ env.PHPUNIT_CONFIG }} --exclude-group ${{ env.SLOW_TESTS }},ajax,ms-files,ms-excluded,oembed-headers
|
||||
|
||||
- name: Run PHPUnit tests
|
||||
if: ${{ matrix.php >= '7.0' }}
|
||||
run: node ./tools/local-env/scripts/docker.js run php ./vendor/bin/phpunit --verbose -c ${{ env.PHPUNIT_CONFIG }}
|
||||
|
||||
- name: Run AJAX tests
|
||||
if: ${{ ! matrix.split_slow }}
|
||||
run: node ./tools/local-env/scripts/docker.js run php ./vendor/bin/phpunit --verbose -c ${{ env.PHPUNIT_CONFIG }} --group ajax
|
||||
|
||||
- name: Run ms-files tests as a multisite install
|
||||
if: ${{ matrix.multisite && ! matrix.split_slow }}
|
||||
if: ${{ matrix.multisite }}
|
||||
run: node ./tools/local-env/scripts/docker.js run php ./vendor/bin/phpunit --verbose -c tests/phpunit/multisite.xml --group ms-files
|
||||
|
||||
- name: Run external HTTP tests
|
||||
if: ${{ ! matrix.multisite && ! matrix.split_slow }}
|
||||
if: ${{ ! matrix.multisite }}
|
||||
run: node ./tools/local-env/scripts/docker.js run php ./vendor/bin/phpunit --verbose -c phpunit.xml.dist --group external-http
|
||||
|
||||
# __fakegroup__ is excluded to force PHPUnit to ignore the <exclude> settings in phpunit.xml.dist.
|
||||
- name: Run (Xdebug) tests
|
||||
if: ${{ ! matrix.split_slow }}
|
||||
run: LOCAL_PHP_XDEBUG=true node ./tools/local-env/scripts/docker.js run php ./vendor/bin/phpunit -v --group xdebug --exclude-group __fakegroup__
|
||||
|
||||
- name: Ensure version-controlled files are not modified or deleted
|
||||
|
||||
Reference in New Issue
Block a user