Skip to content

Commit

Permalink
Enhancement: Synchronize with ergebnis/php-library-template
Browse files Browse the repository at this point in the history
  • Loading branch information
localheinz committed Aug 30, 2020
1 parent d763431 commit 8b81065
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 8 deletions.
9 changes: 3 additions & 6 deletions .github/workflows/integrate.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -324,7 +324,7 @@ jobs:
- name: "Install PHP with extensions"
uses: "shivammathur/[email protected]"
with:
coverage: "xdebug"
coverage: "pcov"
extensions: "${{ env.PHP_EXTENSIONS }}"
ini-values: "${{ env.PHP_INI_VALUES }}"
php-version: "${{ matrix.php-version }}"
Expand All @@ -347,11 +347,8 @@ jobs:
with:
dependencies: "${{ matrix.dependencies }}"

- name: "Dump Xdebug filter with phpunit/phpunit"
run: "vendor/bin/phpunit --configuration=test/Integration/phpunit.xml --dump-xdebug-filter=.build/phpunit/xdebug-filter.php"

- name: "Collect code coverage with Xdebug and phpunit/phpunit"
run: "vendor/bin/phpunit --configuration=test/Integration/phpunit.xml --coverage-clover=.build/logs/clover.xml --prepend=.build/phpunit/xdebug-filter.php"
- name: "Collect code coverage with pcov and phpunit/phpunit"
run: "vendor/bin/phpunit --configuration=test/Integration/phpunit.xml --coverage-clover=.build/logs/clover.xml"

- name: "Send code coverage report to Codecov.io"
env:
Expand Down
3 changes: 1 addition & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,7 @@ it: coding-standards static-code-analysis tests ## Runs the coding-standards, st
.PHONY: code-coverage
code-coverage: vendor ## Collects coverage from running integration tests with phpunit/phpunit
mkdir -p .build/phpunit
vendor/bin/phpunit --configuration=test/Integration/phpunit.xml --dump-xdebug-filter=.build/phpunit/xdebug-filter.php
vendor/bin/phpunit --configuration=test/Integration/phpunit.xml --coverage-text --prepend=.build/phpunit/xdebug-filter.php
vendor/bin/phpunit --configuration=test/Integration/phpunit.xml --coverage-text

.PHONY: coding-standards
coding-standards: vendor ## Normalizes composer.json with ergebnis/composer-normalize, lints YAML files with yamllint and fixes code style issues with friendsofphp/php-cs-fixer
Expand Down
1 change: 1 addition & 0 deletions test/Integration/phpunit.xml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
</testsuites>
<php>
<env name="COMPOSER_ALLOW_XDEBUG" value="1"/>
<ini name="memory_limit" value="-1"/>
</php>
<filter>
<whitelist addUncoveredFilesFromWhitelist="true" processUncoveredFilesFromWhitelist="true">
Expand Down

0 comments on commit 8b81065

Please sign in to comment.