Skip to content

Commit e1624da

Browse files
committed
adding test coverage -> codacy
1 parent 0f528b9 commit e1624da

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

.github/workflows/tests.yaml

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,17 @@ jobs:
2525
with:
2626
php-version: ${{ matrix.php }}
2727
extensions: redis
28-
coverage: none
28+
coverage: ${{ matrix.php == '8.4' && 'pcov' || 'none' }}
2929

3030
- name: Install dependencies
3131
run: composer install --no-interaction --prefer-dist --ignore-platform-req=ext-zookeeper
3232

3333
- name: Run tests
34-
run: vendor/bin/phpunit
34+
run: vendor/bin/phpunit ${{ matrix.php == '8.4' && '--coverage-clover clover.xml' || '' }}
35+
36+
- name: Upload coverage to Codacy
37+
if: matrix.php == '8.4'
38+
uses: codacy/codacy-coverage-reporter-action@v1
39+
with:
40+
project-token: ${{ secrets.CODACY_PROJECT_TOKEN }}
41+
coverage-reports: clover.xml

0 commit comments

Comments
 (0)