From e256d8a38207570b761353fdd7c998ca681c8a14 Mon Sep 17 00:00:00 2001 From: Abdul Malik Ikhsan Date: Thu, 27 Aug 2026 10:41:53 +0700 Subject: [PATCH] chore: Enable pcov coverage only on the PHP 8.2 ubuntu job via matrix include --- .github/workflows/ci.yml | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index e9806e5..e83aca3 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -16,6 +16,10 @@ jobs: matrix: operating-system: [ubuntu-latest, macos-latest, windows-latest] php-versions: ["8.2", "8.3", "8.4", "8.5"] + include: + - operating-system: ubuntu-latest + php-versions: "8.2" + coverage: pcov steps: - name: Checkout @@ -25,7 +29,7 @@ jobs: uses: shivammathur/setup-php@v2 with: php-version: ${{ matrix.php-versions }} - coverage: pcov + coverage: ${{ matrix.coverage || 'none' }} - name: Get composer cache directory id: composer-cache @@ -55,15 +59,15 @@ jobs: run: composer rector - name: Run tests with coverage - if: matrix.php-versions == '8.2' && matrix.operating-system == 'ubuntu-latest' + if: matrix.coverage run: composer test -- --coverage-clover coverage.xml - name: Run tests - if: matrix.php-versions != '8.2' || matrix.operating-system != 'ubuntu-latest' + if: "!matrix.coverage" run: composer test - name: Upload coverage to Codecov - if: matrix.php-versions == '8.2' && matrix.operating-system == 'ubuntu-latest' + if: matrix.coverage uses: codecov/codecov-action@v4 with: token: ${{ secrets.CODECOV_TOKEN }}