Skip to content

Commit 1fe19de

Browse files
committed
GitHub workflow 'testing': Check code coverage (require 100%)
1 parent f44b0de commit 1fe19de

File tree

2 files changed

+12
-5
lines changed

2 files changed

+12
-5
lines changed

.github/workflows/testing.yml

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,18 +12,20 @@ jobs:
1212
strategy:
1313
matrix:
1414
operating-system: [ 'ubuntu-latest', 'windows-latest', 'macos-latest' ]
15-
php-versions: [ '7.2', '7.3', '7.4', '8.0' ]
15+
php-version: [ '7.2', '7.3', '7.4', '8.0' ]
1616
include:
1717
- operating-system: ubuntu-latest
18-
php-versions: '7.2'
18+
php-version: '7.2'
19+
fail-fast: false
1920

2021
steps:
2122
- uses: actions/checkout@v2
2223

2324
- name: Setup PHP
2425
uses: shivammathur/setup-php@v2
2526
with:
26-
php-version: ${{ matrix.php-versions }}
27+
php-version: ${{ matrix.php-version }}
28+
coverage: xdebug
2729

2830
- name: Validate composer.json and composer.lock
2931
run: composer validate
@@ -36,3 +38,7 @@ jobs:
3638

3739
- name: Run PHPUnit test suite
3840
run: ./vendor/bin/phpunit
41+
42+
- name: Check code coverage
43+
run: ./vendor/bin/coverage clover.xml 100
44+
if: matrix.php-version != '8.0'

composer.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,8 @@
3434
"require-dev": {
3535
"phpunit/phpunit": "^8",
3636
"mockery/mockery": "^1.3",
37-
"symfony/yaml": "^5.2",
38-
"vimeo/psalm": "^4.4"
37+
"symfony/yaml": "^4.4",
38+
"vimeo/psalm": "^4.4",
39+
"incompass/coverage": "^1.0"
3940
}
4041
}

0 commit comments

Comments
 (0)