mirror of
git://develop.git.wordpress.org/
synced 2025-01-17 12:58:25 +01:00
Build/Test Tools: Use the correct build matrix for the 4.3 branch.
Follow up to [50317]. See #50401. git-svn-id: https://develop.svn.wordpress.org/branches/4.3@50318 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
52db7ed165
commit
9d911df43e
44
.github/workflows/phpunit-tests.yml
vendored
44
.github/workflows/phpunit-tests.yml
vendored
@ -129,21 +129,26 @@ jobs:
|
|||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
php: [ '8.0', '7.4', '7.3', '7.2', '7.1', '7.0', '5.6.20' ]
|
php: [ '5.6' ]
|
||||||
|
phpunit: [ '4-php-5.6' ]
|
||||||
os: [ ubuntu-latest ]
|
os: [ ubuntu-latest ]
|
||||||
memcached: [ false ]
|
memcached: [ false ]
|
||||||
include:
|
include:
|
||||||
# Include job for PHP 7.4 with memcached.
|
- php: '5.5'
|
||||||
- php: '7.4'
|
phpunit: '5.5'
|
||||||
os: ubuntu-latest
|
os: ubuntu-latest
|
||||||
memcached: true
|
memcached: false
|
||||||
# Report the results of the PHP 7.4 without memcached job.
|
- php: '5.4'
|
||||||
- php: '7.4'
|
phpunit: '5.4'
|
||||||
|
os: ubuntu-latest
|
||||||
|
memcached: false
|
||||||
|
- php: '5.3'
|
||||||
|
phpunit: '5.3'
|
||||||
os: ubuntu-latest
|
os: ubuntu-latest
|
||||||
memcached: false
|
memcached: false
|
||||||
report: true
|
|
||||||
env:
|
env:
|
||||||
LOCAL_PHP: ${{ matrix.php }}-fpm
|
LOCAL_PHP: ${{ matrix.php }}-fpm
|
||||||
|
LOCAL_PHPUNIT: ${{ matrix.phpunit }}-fpm
|
||||||
LOCAL_PHP_MEMCACHED: ${{ matrix.memcached }}
|
LOCAL_PHP_MEMCACHED: ${{ matrix.memcached }}
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
@ -179,13 +184,8 @@ jobs:
|
|||||||
- name: Install Dependencies
|
- name: Install Dependencies
|
||||||
run: npx install-changed --install-command="npm ci"
|
run: npx install-changed --install-command="npm ci"
|
||||||
|
|
||||||
- name: Get composer cache directory
|
|
||||||
id: composer-cache
|
|
||||||
if: ${{ env.COMPOSER_INSTALL == true || env.LOCAL_PHP == '8.0-fpm' }}
|
|
||||||
run: echo "::set-output name=dir::$(composer config cache-files-dir)"
|
|
||||||
|
|
||||||
- name: Cache Composer dependencies
|
- name: Cache Composer dependencies
|
||||||
if: ${{ env.COMPOSER_INSTALL == true || env.LOCAL_PHP == '8.0-fpm' }}
|
if: ${{ env.COMPOSER_INSTALL == true }}
|
||||||
uses: actions/cache@v2
|
uses: actions/cache@v2
|
||||||
env:
|
env:
|
||||||
cache-name: cache-composer-dependencies
|
cache-name: cache-composer-dependencies
|
||||||
@ -196,19 +196,10 @@ jobs:
|
|||||||
${{ runner.os }}-php-${{ matrix.php }}-composer-
|
${{ runner.os }}-php-${{ matrix.php }}-composer-
|
||||||
|
|
||||||
- name: Install Composer dependencies
|
- name: Install Composer dependencies
|
||||||
if: ${{ env.COMPOSER_INSTALL == true || env.LOCAL_PHP == '8.0-fpm' }}
|
if: ${{ env.COMPOSER_INSTALL == true }}
|
||||||
run: |
|
run: |
|
||||||
docker-compose run --rm php composer --version
|
docker-compose run --rm php composer --version
|
||||||
|
docker-compose run --rm php composer install
|
||||||
# The PHPUnit 7.x phar is not compatible with PHP 8 and won't be updated,
|
|
||||||
# as PHPUnit 7 is no longer supported. The Composer-installed PHPUnit should be
|
|
||||||
# used for PHP 8 testing instead.
|
|
||||||
if [ ${{ env.LOCAL_PHP }} == '8.0-fpm' ]; then
|
|
||||||
docker-compose run --rm php composer install --ignore-platform-reqs
|
|
||||||
echo "PHPUNIT_SCRIPT=php-composer" >> $GITHUB_ENV
|
|
||||||
else
|
|
||||||
docker-compose run --rm php composer install
|
|
||||||
fi
|
|
||||||
|
|
||||||
- name: Docker debug information
|
- name: Docker debug information
|
||||||
run: |
|
run: |
|
||||||
@ -266,11 +257,8 @@ jobs:
|
|||||||
- name: Run REST API tests
|
- name: Run REST API tests
|
||||||
run: npm run test:${{ env.PHPUNIT_SCRIPT }} -- --verbose -c phpunit.xml.dist --group restapi-jsclient
|
run: npm run test:${{ env.PHPUNIT_SCRIPT }} -- --verbose -c phpunit.xml.dist --group restapi-jsclient
|
||||||
|
|
||||||
# Xdebug supports PHP 8 only from version 3.0, which is not released yet.
|
|
||||||
# Once Xdebug 3.0 is released and included in the Docker image, the IF condition should be removed.
|
|
||||||
# __fakegroup__ is excluded to force PHPUnit to ignore the <exclude> settings in phpunit.xml.dist.
|
# __fakegroup__ is excluded to force PHPUnit to ignore the <exclude> settings in phpunit.xml.dist.
|
||||||
- name: Run (xDebug) tests
|
- name: Run (xDebug) tests
|
||||||
if: ${{ env.LOCAL_PHP != '8.0-fpm' }}
|
|
||||||
run: LOCAL_PHP_XDEBUG=true npm run test:php -- -v --group xdebug --exclude-group __fakegroup__
|
run: LOCAL_PHP_XDEBUG=true npm run test:php -- -v --group xdebug --exclude-group __fakegroup__
|
||||||
|
|
||||||
- name: Checkout the WordPress Test Reporter
|
- name: Checkout the WordPress Test Reporter
|
||||||
|
Loading…
x
Reference in New Issue
Block a user