Skip to content

Commit f852221

Browse files
jrfnlgrogy
authored andcommitted
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.
1 parent 11bb8fc commit f852221

File tree

1 file changed

+7
-21
lines changed

1 file changed

+7
-21
lines changed

.github/workflows/test.yml

Lines changed: 7 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -127,27 +127,14 @@ jobs:
127127
- name: Run the unit tests with code coverage
128128
run: composer coverage
129129

130-
# PHP Coveralls v2 (which supports GH Actions) has a PHP 5.5 minimum, so switch the PHP version.
131-
- name: Switch to PHP latest
132-
if: ${{ success() && matrix.php == '5.3' }}
133-
uses: shivammathur/setup-php@v2
134-
with:
135-
php-version: 'latest'
136-
coverage: none
137-
138-
# Global install is used to prevent a conflict with the local composer.lock.
139-
- name: Install Coveralls
140-
if: ${{ success() }}
141-
run: composer global require php-coveralls/php-coveralls:"^2.6.0" --no-interaction
142-
143130
- name: Upload coverage results to Coveralls
144131
if: ${{ success() }}
145-
env:
146-
COVERALLS_REPO_TOKEN: ${{ secrets.GITHUB_TOKEN }}
147-
COVERALLS_PARALLEL: true
148-
COVERALLS_FLAG_NAME: php-${{ matrix.php }}
149-
run: php-coveralls -v -x build/logs/clover.xml
150-
132+
uses: coverallsapp/github-action@v2
133+
with:
134+
format: clover
135+
file: build/logs/clover.xml
136+
flag-name: php-${{ matrix.php }}
137+
parallel: true
151138

152139
coveralls-finish:
153140
needs: coverage
@@ -156,7 +143,6 @@ jobs:
156143
runs-on: ubuntu-latest
157144
steps:
158145
- name: Coveralls Finished
159-
uses: coverallsapp/github-action@v1
146+
uses: coverallsapp/github-action@v2
160147
with:
161-
github-token: ${{ secrets.GITHUB_TOKEN }}
162148
parallel-finished: true

0 commit comments

Comments
 (0)