diff --git a/.github/workflows/phpunit-tests.yml b/.github/workflows/phpunit-tests.yml index 5f4081eb6c..bc955ce6b6 100644 --- a/.github/workflows/phpunit-tests.yml +++ b/.github/workflows/phpunit-tests.yml @@ -34,8 +34,8 @@ env: jobs: # Runs the PHPUnit tests for WordPress. # - # Note: Steps running tests for PHP 8.1 jobs are allowed to "continue-on-error". - # This prevents workflow runs from being marked as "failed" when only PHP 8.1 fails. + # Note: Steps running tests on PHP 8.1 + 8.2 are allowed to "continue-on-error" (for now). + # This prevents workflow runs from being marked as "failed" when only PHP 8.1/8.2 fails. # # Performs the following steps: # - Sets environment variables. @@ -64,7 +64,7 @@ jobs: strategy: fail-fast: false matrix: - php: [ '5.6', '7.0', '7.1', '7.2', '7.3', '7.4', '8.0', '8.1' ] + php: [ '5.6', '7.0', '7.1', '7.2', '7.3', '7.4', '8.0', '8.1', '8.2' ] os: [ ubuntu-latest ] memcached: [ false ] split_slow: [ false ] @@ -143,8 +143,8 @@ jobs: docker-compose run --rm php composer --version # Install using `composer update` as there is no `composer.lock` file. - if [ ${{ env.LOCAL_PHP }} == '8.1-fpm' ]; then - docker-compose run --rm php composer update --ignore-platform-reqs + if [ ${{ env.LOCAL_PHP }} == '8.2-fpm' ]; then + docker-compose run --rm php composer update --ignore-platform-req=php+ else docker-compose run --rm php composer update fi @@ -194,27 +194,27 @@ jobs: - name: Run PHPUnit tests if: ${{ matrix.php >= '7.0' }} - continue-on-error: ${{ matrix.php == '8.1' }} + continue-on-error: ${{ matrix.php == '8.1' || matrix.php == '8.2' }} 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 }} - continue-on-error: ${{ matrix.php == '8.1' }} + continue-on-error: ${{ matrix.php == '8.1' || matrix.php == '8.2' }} 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 }} - continue-on-error: ${{ matrix.php == '8.1' }} + continue-on-error: ${{ matrix.php == '8.1' || matrix.php == '8.2' }} 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 }} - continue-on-error: ${{ matrix.php == '8.1' }} + continue-on-error: ${{ matrix.php == '8.1' || matrix.php == '8.2' }} 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 settings in phpunit.xml.dist. - - name: Run (xDebug) tests - if: ${{ ! matrix.split_slow }} + - name: Run (Xdebug) tests + if: ${{ ! matrix.split_slow && matrix.php != '8.2' }} continue-on-error: ${{ matrix.php == '8.1' }} run: LOCAL_PHP_XDEBUG=true node ./tools/local-env/scripts/docker.js run php ./vendor/bin/phpunit -v --group xdebug --exclude-group __fakegroup__