From a120632be8411269ec719cd005fe94da2329132b Mon Sep 17 00:00:00 2001 From: soyuka Date: Fri, 29 May 2026 18:05:23 +0200 Subject: [PATCH] ci: trim phpunit-components matrix and merge fail-deprecation Push variants for component matrix reduced from 6 to 4 (drop 8.3/8.4). Root phpunit job still covers 8.3/8.4 at integration level. Fold phpunit-components-fail-deprecation job into phpunit-components as a second phpunit run gated to PHP 8.5 non-lowest/non-minimal slot. Reuses composer cache and shaves ~48 jobs per push. --- .github/workflows/ci.yml | 64 ++++++++-------------------------------- 1 file changed, 13 insertions(+), 51 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 62d9ce3f8e..606832f764 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -313,7 +313,14 @@ jobs: timeout-minutes: 20 strategy: matrix: - php: ${{ fromJSON(github.event_name == 'pull_request' && '[{"version":"8.2"},{"version":"8.5","coverage":true},{"version":"8.5","lowest":true},{"version":"8.5","minimal-changes":true}]' || '[{"version":"8.2"},{"version":"8.3"},{"version":"8.4"},{"version":"8.5","coverage":true},{"version":"8.5","lowest":true},{"version":"8.5","minimal-changes":true}]') }} + php: + - version: '8.2' + - version: '8.5' + coverage: true + - version: '8.5' + lowest: true + - version: '8.5' + minimal-changes: true component: - api-platform/doctrine-common - api-platform/doctrine-orm @@ -370,6 +377,11 @@ jobs: run: | mkdir -p /tmp/build/logs/phpunit composer ${{matrix.component}} test -- --log-junit "/tmp/build/logs/phpunit/junit.xml" ${{ matrix.php.coverage && '--coverage-clover /tmp/build/logs/phpunit/clover.xml' || '' }}${{ matrix.php.lowest && ' --ignore-baseline' || '' }} + - name: Run ${{ matrix.component }} tests (no deprecations) + if: ${{ matrix.php.version == '8.5' && !matrix.php.lowest && !matrix.php.minimal-changes }} + run: | + cd $(composer ${{matrix.component}} --cwd) + ./vendor/bin/phpunit --fail-on-deprecation --display-deprecations - name: Upload test artifacts if: always() uses: actions/upload-artifact@v6 @@ -397,56 +409,6 @@ jobs: php-coveralls --coverage_clover=/tmp/build/logs/phpunit/clover.xml continue-on-error: true - phpunit-components-fail-deprecation: - name: PHPUnit no deprecations ${{ matrix.component }} (PHP ${{ matrix.php.version }} - runs-on: ubuntu-latest - timeout-minutes: 20 - strategy: - matrix: - php: - - version: '8.5' - component: - - api-platform/doctrine-common - - api-platform/doctrine-orm - - api-platform/doctrine-odm - - api-platform/metadata - - api-platform/hydra - - api-platform/json-api - - api-platform/json-schema - - api-platform/elasticsearch - - api-platform/openapi - - api-platform/graphql - - api-platform/http-cache - - api-platform/ramsey-uuid - - api-platform/serializer - - api-platform/state - - api-platform/symfony - - api-platform/validator - fail-fast: false - steps: - - name: Checkout - uses: actions/checkout@v6 - - name: Setup PHP - uses: shivammathur/setup-php@v2 - with: - php-version: ${{ matrix.php.version }} - tools: pecl, composer:2.9.8 - extensions: intl, bcmath, curl, openssl, mbstring, pdo_sqlite - ini-values: memory_limit=-1 - - name: Linking - run: | - composer global require soyuka/pmu - composer global config allow-plugins.soyuka/pmu true --no-interaction - composer global link . --permanent - - name: Run ${{ matrix.component }} install - run: | - composer ${{matrix.component}} update - - name: Run ${{ matrix.component }} tests - run: | - mkdir -p /tmp/build/logs/phpunit - cd $(composer ${{matrix.component}} --cwd) - ./vendor/bin/phpunit --fail-on-deprecation --display-deprecations --log-junit "/tmp/build/logs/phpunit/junit.xml" - postgresql: name: PHPUnit (PHP ${{ matrix.php }}) (PostgreSQL) runs-on: ubuntu-latest