From 1341bc9e8144d6461909a408a4f579b74aff07e5 Mon Sep 17 00:00:00 2001 From: jrfnl Date: Sat, 16 Sep 2023 04:12:42 +0200 Subject: [PATCH] GH Actions: switch to Coveralls action runner to upload reports Simplify the code coverage workflow by removing the dependency on the `php-coveralls/php-coveralls` package and switching to the `coverallsapp/github-action` action runner, which, as of the release of the [0.6.5 version of the Coverage Reporter](https://github.com/coverallsapp/coverage-reporter/releases/tag/v0.6.5) now natively supports the Clover format. The `COVERALLS_TOKEN` can now be removed from Settings -> Secrets. --- .github/workflows/test.yml | 27 +++++++-------------------- 1 file changed, 7 insertions(+), 20 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index c26ad74..453a1b1 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -194,26 +194,14 @@ jobs: if: ${{ steps.phpunit_version.outputs.VERSION >= '9.3' }} run: composer coverage -- --coverage-cache ./build/phpunit-cache - # PHP Coveralls v2 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: 'latest' - coverage: none - - # 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.6.0" --no-interaction --with-all-dependencies - - name: Upload coverage results to Coveralls if: ${{ success() }} - env: - COVERALLS_REPO_TOKEN: ${{ secrets.GITHUB_TOKEN }} - COVERALLS_PARALLEL: true - COVERALLS_FLAG_NAME: php-${{ matrix.php }}-phpcs-${{ matrix.phpcs_version }} - run: php-coveralls -v -x build/logs/clover.xml + uses: coverallsapp/github-action@v2 + with: + format: clover + file: build/logs/clover.xml + flag-name: php-${{ matrix.php }}-phpcs-${{ matrix.phpcs_version }} + parallel: true coveralls-finish: needs: coverage @@ -221,7 +209,6 @@ jobs: steps: - name: Coveralls Finished - uses: coverallsapp/github-action@v1 + uses: coverallsapp/github-action@v2 with: - github-token: ${{ secrets.GITHUB_TOKEN }} parallel-finished: true