Skip to content

Commit 151bed4

Browse files
authored
GH Actions: switch to Coveralls action runner to upload reports (#313)
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. Co-authored-by: jrfnl <[email protected]>
1 parent fdac475 commit 151bed4

File tree

1 file changed

+7
-20
lines changed

1 file changed

+7
-20
lines changed

.github/workflows/test.yml

Lines changed: 7 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -194,34 +194,21 @@ jobs:
194194
if: ${{ steps.phpunit_version.outputs.VERSION >= '9.3' }}
195195
run: composer coverage -- --coverage-cache ./build/phpunit-cache
196196

197-
# PHP Coveralls v2 has a PHP 5.5 minimum, so switch the PHP version.
198-
- name: Switch to PHP latest
199-
if: ${{ success() && matrix.php == '5.4' }}
200-
uses: shivammathur/setup-php@v2
201-
with:
202-
php-version: 'latest'
203-
coverage: none
204-
205-
# Global install is used to prevent a conflict with the local composer.lock.
206-
- name: Install Coveralls
207-
if: ${{ success() }}
208-
run: composer global require php-coveralls/php-coveralls:"^2.6.0" --no-interaction --with-all-dependencies
209-
210197
- name: Upload coverage results to Coveralls
211198
if: ${{ success() }}
212-
env:
213-
COVERALLS_REPO_TOKEN: ${{ secrets.GITHUB_TOKEN }}
214-
COVERALLS_PARALLEL: true
215-
COVERALLS_FLAG_NAME: php-${{ matrix.php }}-phpcs-${{ matrix.phpcs_version }}
216-
run: php-coveralls -v -x build/logs/clover.xml
199+
uses: coverallsapp/github-action@v2
200+
with:
201+
format: clover
202+
file: build/logs/clover.xml
203+
flag-name: php-${{ matrix.php }}-phpcs-${{ matrix.phpcs_version }}
204+
parallel: true
217205

218206
coveralls-finish:
219207
needs: coverage
220208
runs-on: ubuntu-latest
221209

222210
steps:
223211
- name: Coveralls Finished
224-
uses: coverallsapp/github-action@v1
212+
uses: coverallsapp/github-action@v2
225213
with:
226-
github-token: ${{ secrets.GITHUB_TOKEN }}
227214
parallel-finished: true

0 commit comments

Comments
 (0)