Skip to content

Commit 4ae4fd8

Browse files
authored
Merge pull request #213 from oliverklee/feature/coverage
Create code coverage during the CI builds
2 parents 727f1ca + 71c513b commit 4ae4fd8

File tree

1 file changed

+14
-12
lines changed

1 file changed

+14
-12
lines changed

.github/workflows/ci.yml

Lines changed: 14 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -39,16 +39,11 @@ jobs:
3939
strategy:
4040
fail-fast: false
4141
matrix:
42-
php-version:
43-
- 5.3
44-
- 5.4
45-
- 5.5
46-
- 5.6
47-
- 7.0
48-
- 7.1
49-
- 7.2
50-
- 7.3
51-
- 7.4
42+
php-version: [ '5.3', '5.4', '5.5', '5.6', '7.0', '7.1', '7.2', '7.3' ]
43+
coverage: [ 'none' ]
44+
include:
45+
- php-version: 7.4
46+
coverage: xdebug
5247

5348
steps:
5449
- name: Checkout
@@ -59,7 +54,7 @@ jobs:
5954
with:
6055
php-version: ${{ matrix.php-version }}
6156
tools: composer:v2
62-
coverage: none
57+
coverage: "${{ matrix.coverage }}"
6358

6459
- name: Cache dependencies installed with composer
6560
uses: actions/cache@v1
@@ -75,4 +70,11 @@ jobs:
7570
composer show;
7671
7772
- name: Run Tests
78-
run: ./vendor/bin/phpunit
73+
run: ./vendor/bin/phpunit --coverage-clover build/coverage/xml
74+
75+
- name: Upload coverage results to Coveralls
76+
if: "${{ matrix.coverage != 'none' }}"
77+
env:
78+
CODACY_PROJECT_TOKEN: ${{ secrets.CODACY_PROJECT_TOKEN }}
79+
run: |
80+
./vendor/bin/codacycoverage clover build/coverage/xml

0 commit comments

Comments
 (0)