Skip to content

Commit

Permalink
Update PHPUnit config
Browse files Browse the repository at this point in the history
  • Loading branch information
misantron committed Apr 28, 2023
1 parent e41de25 commit d589924
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 27 deletions.
11 changes: 5 additions & 6 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
uses: ramsey/composer-install@v2
with:
dependency-versions: locked
composer-options: --no-ansi --no-interaction --no-progress
composer-options: --ansi --no-interaction --no-progress
- name: Run ecs check
run: vendor/bin/ecs check
tests:
Expand All @@ -39,9 +39,9 @@ jobs:
uses: ramsey/composer-install@v2
with:
dependency-versions: locked
composer-options: --no-ansi --no-interaction --no-progress
composer-options: --ansi --no-interaction --no-progress
- name: Run tests
run: vendor/bin/phpunit
run: vendor/bin/phpunit --colors=always
coverage:
name: Tests coverage
runs-on: ubuntu-latest
Expand All @@ -57,12 +57,11 @@ jobs:
uses: ramsey/composer-install@v2
with:
dependency-versions: locked
composer-options: --no-ansi --no-interaction --no-progress
composer-options: --ansi --no-interaction --no-progress
- name: Run tests with coverage
run: vendor/bin/phpunit --coverage-clover=clover.xml
run: vendor/bin/phpunit --colors=always --coverage-clover=clover.xml
- name: Upload coverage
uses: codecov/codecov-action@v3
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: clover.xml
verbose: true
39 changes: 18 additions & 21 deletions phpunit.xml.dist
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>

<phpunit
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="vendor/phpunit/phpunit/phpunit.xsd"
colors="true"
testdox="true"
Expand All @@ -10,22 +8,21 @@
stopOnFailure="true"
bootstrap="vendor/autoload.php"
>
<php>
<ini name="error_reporting" value="-1" />
<ini name="display_errors" value="On" />
<ini name="display_startup_errors" value="On" />
<ini name="date.timezone" value="UTC" />
</php>

<testsuites>
<testsuite name="All">
<directory>tests</directory>
</testsuite>
</testsuites>

<coverage>
<include>
<directory suffix=".php">src</directory>
</include>
</coverage>
<php>
<ini name="error_reporting" value="-1"/>
<ini name="display_errors" value="On"/>
<ini name="display_startup_errors" value="On"/>
<ini name="date.timezone" value="UTC"/>
</php>
<testsuites>
<testsuite name="All">
<directory>tests</directory>
</testsuite>
</testsuites>
<coverage/>
<source>
<include>
<directory>src</directory>
</include>
</source>
</phpunit>

0 comments on commit d589924

Please sign in to comment.