Skip to content

Commit af9cea1

Browse files
authored
Merge pull request #39 from GravityPDF/code-coverage
Add code coverage report to GA
2 parents 7732d88 + 4280f56 commit af9cea1

1 file changed

Lines changed: 17 additions & 2 deletions

File tree

.github/workflows/unit-testing.yml

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,10 @@ jobs:
88
strategy:
99
matrix:
1010
php-versions: [ '7.1', '7.2', '7.3', '7.4', '8.0', '8.1', '8.2' ]
11+
include:
12+
- php: '8.2'
13+
report: true
14+
1115
name: PHP ${{ matrix.php-versions }} PHPUnit Test
1216
steps:
1317
- name: Checkout repository
@@ -27,5 +31,16 @@ jobs:
2731
php --version
2832
composer --version
2933
30-
- name: Run PHPUnit
31-
run: ./vendor/bin/phpunit
34+
- name: Run PHPUnit Tests without coverage
35+
if: ${{ ! matrix.report }}
36+
run: ./vendor/bin/phpunit
37+
38+
- name: Run PHPUnit Tests with coverage
39+
if: ${{ matrix.report }}
40+
run: ./vendor/bin/phpunit --coverage-clover=./coverage/coverage1.xml
41+
42+
- name: Check Code Coverage
43+
if: ${{ matrix.report }}
44+
uses: codecov/codecov-action@v3
45+
with:
46+
directory: ./coverage/

0 commit comments

Comments
 (0)