Skip to content

Commit e6ab7f7

Browse files
Report code coverage correctly
1 parent 63d59e2 commit e6ab7f7

File tree

1 file changed

+24
-0
lines changed

1 file changed

+24
-0
lines changed

.github/workflows/php.yml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,3 +38,27 @@ jobs:
3838

3939
- name: Run unit tests
4040
run: ./vendor/bin/phpunit --testdox
41+
42+
coverage:
43+
runs-on: ubuntu-latest
44+
45+
steps:
46+
- uses: actions/checkout@v1
47+
48+
- name: Setup PHP
49+
uses: shivammathur/setup-php@v1
50+
with:
51+
php-version: 7.4
52+
extensions: mbstring, intl, json
53+
coverage: pcov
54+
55+
- name: Install dependencies
56+
run: composer install --prefer-dist --no-progress --no-suggest
57+
58+
- name: Test & publish code coverage
59+
uses: paambaati/codeclimate-action@v2.3.0
60+
env:
61+
CC_TEST_REPORTER_ID: ${{ secrets.codeClimateReporterID }}
62+
with:
63+
coverageCommand: ./vendor/bin/phpunit --coverage-clover=clover.xml
64+
debug: true

0 commit comments

Comments
 (0)