Skip to content

Commit b0544a7

Browse files
author
farhadzand
committed
add log
1 parent bbf4365 commit b0544a7

File tree

2 files changed

+12
-3
lines changed

2 files changed

+12
-3
lines changed

.github/workflows/tests.yml

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ jobs:
1414
timeout-minutes: 15
1515
env:
1616
COMPOSER_NO_INTERACTION: 1
17+
XDEBUG_MODE: coverage
1718
strategy:
1819
fail-fast: false
1920
matrix:
@@ -43,7 +44,7 @@ jobs:
4344
with:
4445
php-version: ${{ matrix.php }}
4546
extensions: dom, curl, libxml, mbstring, zip, pcntl, pdo, sqlite, pdo_sqlite, bcmath, soap, intl, gd, exif, iconv, imagick
46-
coverage: none
47+
coverage: xdebug
4748

4849
- name: Install dependencies
4950
run: |
@@ -53,4 +54,10 @@ jobs:
5354
5455
- name: Execute tests
5556
run: |
56-
vendor/bin/phpunit
57+
vendor/bin/phpunit --coverage-clover=coverage.clover
58+
59+
- name: Upload coverage to Scrutinizer
60+
if: success()
61+
run: |
62+
wget https://scrutinizer-ci.com/ocular.phar
63+
php ocular.phar code-coverage:upload --format=php-clover coverage.clover || true

phpunit.xml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
processIsolation="false"
77
stopOnFailure="false"
88
executionOrder="random"
9-
failOnWarning="true"
9+
failOnWarning="false"
1010
failOnRisky="true"
1111
failOnEmptyTestSuite="true"
1212
beStrictAboutOutputDuringTests="true"
@@ -27,5 +27,7 @@
2727
<php>
2828
<env name="DB_CONNECTION" value="sqlite"/>
2929
<env name="DB_DATABASE" value=":memory:"/>
30+
<!-- Simulate Xdebug for coverage when not available -->
31+
<env name="XDEBUG_MODE" value="coverage"/>
3032
</php>
3133
</phpunit>

0 commit comments

Comments
 (0)