Skip to content

Commit d0a0db0

Browse files
authored
Merge pull request #6 from renakdup/renakdup-patch-2
Update phpunit.yaml
2 parents 0c414ca + a8e401a commit d0a0db0

File tree

5 files changed

+60
-6
lines changed

5 files changed

+60
-6
lines changed

.github/workflows/phpunit.yaml

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ jobs:
2121
with:
2222
php-version: ${{ env.PHP_VER }}
2323
tools: composer:v${{ env.COMPOSER_VER }}
24+
coverage: pcov
2425

2526
- name: Get Composer Cache Directory
2627
id: composer-cache
@@ -38,5 +39,9 @@ jobs:
3839
run: |
3940
composer install
4041
41-
- name: Run PHPUnit
42-
run: composer run phpunit
42+
- name: Tests coverage
43+
uses: paambaati/[email protected]
44+
env:
45+
CC_TEST_REPORTER_ID: ${{ secrets.CC_TEST_REPORTER_ID }}
46+
with:
47+
coverageCommand: composer run phpunit-coverage

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
[![UnitTests](https://github.com/renakdup/simple-wordpress-dic/actions/workflows/phpunit.yaml/badge.svg)](https://github.com/renakdup/simple-wordpress-dic/actions/workflows/phpunit.yaml)
44
[![PHPStan](https://github.com/renakdup/simple-wordpress-dic/actions/workflows/phpstan.yaml/badge.svg)](https://github.com/renakdup/simple-wordpress-dic/actions/workflows/phpstan.yaml)
55
[![PHP Version Require](http://poser.pugx.org/renakdup/simple-php-dic/require/php)](https://packagist.org/packages/renakdup/simple-php-dic)
6+
[![Test Coverage](https://api.codeclimate.com/v1/badges/21ae6e3776b160b24e75/test_coverage)](https://codeclimate.com/github/renakdup/simple-php-dic/test_coverage)
67
[![Dependents](http://poser.pugx.org/renakdup/simple-php-dic/dependents)](https://packagist.org/packages/renakdup/simple-php-dic)
78

89

composer.json

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,8 @@
3434
"symfony/var-dumper": "^5.4",
3535
"phpstan/phpstan": "^1.10",
3636
"phpstan/extension-installer": "^1.3",
37-
"phpstan/phpstan-deprecation-rules": "^1.1"
37+
"phpstan/phpstan-deprecation-rules": "^1.1",
38+
"rregeer/phpunit-coverage-check": "^0.3.1"
3839
},
3940
"autoload-dev": {
4041
"psr-4": {
@@ -47,7 +48,8 @@
4748
"phpcbf": "phpcbf --standard=./phpcs.xml",
4849
"phpstan": "phpstan analyse -c phpstan.neon",
4950
"phpstan.baselane": "phpstan analyse -c phpstan.neon --generate-baseline",
50-
"phpunit": "phpunit"
51+
"phpunit": "phpunit",
52+
"phpunit-coverage": "phpunit --coverage-clover clover.xml"
5153
},
5254
"config": {
5355
"allow-plugins": {

composer.lock

Lines changed: 47 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

phpunit.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
">
99
<coverage includeUncoveredFiles="true">
1010
<include>
11-
<directory suffix=".php">/</directory>
11+
<directory suffix=".php">./src</directory>
1212
</include>
1313
</coverage>
1414

0 commit comments

Comments
 (0)