Add code coverage to PHP 8.5 in build.yml workflow. (#20660)

This commit is contained in:
Wilmer Arambula
2025-10-30 10:35:45 -03:00
committed by GitHub
parent 7b6a617364
commit bc0ea37b42

View File

@@ -49,9 +49,13 @@ jobs:
phpunit:
name: PHP ${{ matrix.php }}
env:
COVERAGE_DRIVER: ${{ matrix.php < 8.1 && 'xdebug' || 'pcov' }}
IGNORE_PLATFORM_REQS: false
runs-on: ubuntu-latest
services:
services: &memcached-service
memcached:
image: memcached:latest
ports:
@@ -65,9 +69,9 @@ jobs:
strategy:
fail-fast: false
matrix:
php: [7.4, 8.0, 8.1, 8.2, 8.3, 8.4]
php: [7.4, 8.0, 8.1, 8.2, 8.3, 8.4, 8.5]
steps:
steps: &build-steps
- name: Checkout.
uses: actions/checkout@v5
@@ -77,55 +81,33 @@ jobs:
- name: Setup PHP with Composer.
uses: ./.github/actions/php-setup
with:
coverage-driver: ${{ matrix.php < 8.1 && 'xdebug' || 'pcov' }}
coverage-driver: ${{ env.COVERAGE_DRIVER }}
extensions: ${{ matrix.php < 8.0 && 'apc' || 'apcu' }}, ${{ env.PHP_EXTENSIONS }}
ignore-platform-reqs: ${{ env.IGNORE_PLATFORM_REQS }}
ini-values: ${{ env.PHP_INI_VALUES }}, session.save_path="${{ runner.temp }}"
php-version: ${{ matrix.php }}
- name: Run PHPUnit tests.
uses: ./.github/actions/phpunit
with:
coverage-driver: ${{ matrix.php < 8.1 && 'xdebug' || 'pcov' }}
coverage-driver: ${{ env.COVERAGE_DRIVER }}
coverage-token: ${{ secrets.CODECOV_TOKEN }}
exclude-group: ${{ env.PHPUNIT_EXCLUDE_GROUP }}
phpunit-dev:
name: PHP ${{ matrix.php }}
env:
COVERAGE_DRIVER: none
IGNORE_PLATFORM_REQS: true
runs-on: ubuntu-latest
services:
memcached:
image: memcached:latest
ports:
- 11211:11211
options: >-
--health-cmd "timeout 5 bash -c 'cat < /dev/null > /dev/tcp/127.0.0.1/11211'"
--health-interval 10s
--health-retries 5
--health-timeout 5s
services: *memcached-service
strategy:
fail-fast: false
matrix:
php: [8.5, 8.6]
php: [8.6]
steps:
- name: Checkout.
uses: actions/checkout@v5
- name: Generate french locale.
run: sudo locale-gen fr_FR.UTF-8
- name: Setup PHP with Composer.
uses: ./.github/actions/php-setup
with:
extensions: ${{ matrix.php < 8.0 && 'apc' || 'apcu' }}, ${{ env.PHP_EXTENSIONS }}
ignore-platform-reqs: true
ini-values: ${{ env.PHP_INI_VALUES }}, session.save_path="${{ runner.temp }}"
php-version: ${{ matrix.php }}
- name: Run PHPUnit tests.
uses: ./.github/actions/phpunit
with:
exclude-group: ${{ env.PHPUNIT_EXCLUDE_GROUP }}
steps: *build-steps