Skip to content

Commit

Permalink
GH Actions: update for php-coveralls 2.6.0
Browse files Browse the repository at this point in the history
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
  • Loading branch information
jrfnl committed Nov 23, 2023
1 parent 7d90fe8 commit 8dc05c0
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -126,18 +126,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 8.1
if: ${{ success() && matrix.php != '8.1' }}
# 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.3' }}
uses: shivammathur/setup-php@v2
with:
php-version: 8.1
php-version: 'latest'
coverage: none

# Global installing is used for compatibility with composer.lock in PHP 5.3
# 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
if: ${{ success() }}
Expand Down

0 comments on commit 8dc05c0

Please sign in to comment.