From 48bf93b319698b0cdf97d8f662f5820a53d4d8ef Mon Sep 17 00:00:00 2001 From: jrfnl Date: Sun, 16 Jul 2023 11:51:30 +0200 Subject: [PATCH] GH Actions: update for php-coveralls 2.6.0 PHP-Coveralls 2.6.0 has just been released and includes a fix for the last known PHP 8.x issue. This means that it should now be safe to install php-coveralls on PHP 8.x and upload from there, which means we now only need the work-around for the PHP version when on PHP < 5.5 (as Coveralls v1 does not work with GH Actions). Ref: * https://github.com/php-coveralls/php-coveralls/releases/tag/v2.6.0 --- .github/workflows/test.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 80d610c1..fefcc5c5 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -168,18 +168,18 @@ jobs: - name: Run the unit tests with code coverage run: composer coverage - # Uploading the results with PHP Coveralls v1 won't work from GH Actions, so switch the PHP version. - - name: Switch to PHP 7.4 - if: ${{ success() && matrix.php != '7.4' }} + # PHP Coveralls v2 (which supports GH Actions) has a PHP 5.5 minimum, so switch the PHP version. + - name: Switch to PHP latest + if: ${{ success() && matrix.php == '5.4' }} uses: shivammathur/setup-php@v2 with: - php-version: 7.4 + php-version: 'latest' coverage: none - # Global install is used to prevent a conflict with the local composer.lock in PHP 8.0+. + # Global install is used to prevent a conflict with the local composer.lock. - name: Install Coveralls if: ${{ success() }} - run: composer global require php-coveralls/php-coveralls:"^2.5.3" --no-interaction + run: composer global require php-coveralls/php-coveralls:"^2.6.0" --no-interaction - name: Upload coverage results to Coveralls (normal) if: ${{ success() && github.actor != 'dependabot[bot]' }}