Skip to content

Commit

Permalink
Update phpunit.xml.dist
Browse files Browse the repository at this point in the history
  • Loading branch information
imanghafoori1 committed Jun 13, 2024
1 parent 3e8186e commit 4c09c55
Show file tree
Hide file tree
Showing 11 changed files with 156 additions and 31 deletions.
3 changes: 1 addition & 2 deletions .gitattributes
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,9 @@
/.gitignore export-ignore
/.travis.yml export-ignore
/.styleci.yml export-ignore
/phpunit.xml.dist export-ignore
/phpunit.xml export-ignore
/readme.md export-ignore
/phpunit.bat export-ignore
/.scrutinizer.yml export-ignore
/tests export-ignore
/.editorconfig export-ignore
/phpunit_conf export-ignore
33 changes: 27 additions & 6 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
matrix:
os: [ubuntu-latest, windows-latest]
php: [7.2, 7.3, 7.4, 8.0, 8.1, 8.2, 8.3]
laravel: [6.*, 7.*, 8.*, 9.*, 10.*, 11.*]
laravel: [6.*, 7.*, 8.*, 9.*, 10.*]
exclude:
- php: 7.2
laravel: 8.*
Expand Down Expand Up @@ -62,22 +62,43 @@ jobs:
laravel: 11.*
- php: 8.0
laravel: 11.*
- php: 8.1
laravel: 11.*
name: PHP ${{ matrix.php }} - Laravel ${{ matrix.laravel }} - OS ${{ matrix.os }}

steps:
- name: Checkout code
uses: actions/checkout@v2

with:
fetch-depth: 1
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
extensions: mbstring, exif, iconv, tokenizer, fileinfo
coverage: none
extensions: mbstring, exif, iconv, tokenizer, fileinfo, xdebug
coverage: xdebug

- name: Install dependencies
run: |
composer require "laravel/framework=${{ matrix.laravel }}" --no-update
composer update --prefer-dist --no-interaction --no-progress
- name: Run tests
run: vendor/bin/phpunit
- name: PHPUnit
run: |
./vendor/bin/phpunit --stop-on-failure --coverage-clover ./clover.xml -c ./phpunit_conf/phpunit_${{ matrix.php }}.xml.dist
env:
XDEBUG_MODE: coverage
- name: Make code coverage badge
uses: timkrase/[email protected]
with:
coverage_badge_path: output/coverage.svg
push_badge: false

- name: Git push to image-data branch
uses: peaceiris/actions-gh-pages@v3
with:
publish_dir: ./output
publish_branch: image-data
github_token: ${{ secrets.GITHUB_TOKEN }}
user_name: 'github-actions[bot]'
user_email: 'github-actions[bot]@users.noreply.github.com'
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
}
},
"require-dev": {
"orchestra/testbench": "~3.0|~4.0|~5.0|~6.0|~7.0|~8.0",
"orchestra/testbench": "~3.0|~4.0|~5.0|~6.0|~7.0|~8.0|~9.0|~10.0",
"imanghafoori/php-imports-analyzer": "1.0.*",
"barryvdh/laravel-debugbar": ">=v1.0.0",
"mockery/mockery": ">=0.9"
Expand Down
22 changes: 0 additions & 22 deletions phpunit.xml.dist

This file was deleted.

21 changes: 21 additions & 0 deletions phpunit_conf/phpunit_7.2.xml.dist
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
<?xml version="1.0" encoding="UTF-8"?>
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/10.5/phpunit.xsd"
bootstrap="./../vendor/autoload.php"
executionOrder="depends,defects"
beStrictAboutOutputDuringTests="true"
failOnRisky="true"
failOnWarning="true">

<testsuites>
<testsuite name="default">
<directory>./../tests</directory>
</testsuite>
</testsuites>


<whitelist>
<directory suffix=".php">./src</directory>
<exclude></exclude>
</whitelist>
</phpunit>
21 changes: 21 additions & 0 deletions phpunit_conf/phpunit_7.3.xml.dist
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
<?xml version="1.0" encoding="UTF-8"?>
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/10.5/phpunit.xsd"
bootstrap="./../vendor/autoload.php"
executionOrder="depends,defects"
beStrictAboutOutputDuringTests="true"
failOnRisky="true"
failOnWarning="true">

<testsuites>
<testsuite name="default">
<directory>./../tests</directory>
</testsuite>
</testsuites>


<whitelist>
<directory suffix=".php">./src</directory>
<exclude></exclude>
</whitelist>
</phpunit>
17 changes: 17 additions & 0 deletions phpunit_conf/phpunit_7.4.xml.dist
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<?xml version="1.0" encoding="UTF-8"?>
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/10.5/phpunit.xsd"
bootstrap="./../vendor/autoload.php"
executionOrder="depends,defects"
beStrictAboutOutputDuringTests="true"
failOnRisky="true"
failOnWarning="true">

<testsuites>
<testsuite name="default">
<directory>./../tests</directory>
</testsuite>
</testsuites>


</phpunit>
17 changes: 17 additions & 0 deletions phpunit_conf/phpunit_8.0.xml.dist
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<?xml version="1.0" encoding="UTF-8"?>
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/10.5/phpunit.xsd"
bootstrap="./../vendor/autoload.php"
executionOrder="depends,defects"
beStrictAboutOutputDuringTests="true"
failOnRisky="true"
failOnWarning="true">

<testsuites>
<testsuite name="default">
<directory>./../tests</directory>
</testsuite>
</testsuites>


</phpunit>
17 changes: 17 additions & 0 deletions phpunit_conf/phpunit_8.1.xml.dist
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<?xml version="1.0" encoding="UTF-8"?>
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/10.5/phpunit.xsd"
bootstrap="./../vendor/autoload.php"
executionOrder="depends,defects"
beStrictAboutOutputDuringTests="true"
failOnRisky="true"
failOnWarning="true">

<testsuites>
<testsuite name="default">
<directory>./../tests</directory>
</testsuite>
</testsuites>


</phpunit>
17 changes: 17 additions & 0 deletions phpunit_conf/phpunit_8.2.xml.dist
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<?xml version="1.0" encoding="UTF-8"?>
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/10.5/phpunit.xsd"
bootstrap="./../vendor/autoload.php"
executionOrder="depends,defects"
beStrictAboutOutputDuringTests="true"
failOnRisky="true"
failOnWarning="true">

<testsuites>
<testsuite name="default">
<directory>./../tests</directory>
</testsuite>
</testsuites>


</phpunit>
17 changes: 17 additions & 0 deletions phpunit_conf/phpunit_8.3.xml.dist
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<?xml version="1.0" encoding="UTF-8"?>
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/10.5/phpunit.xsd"
bootstrap="./../vendor/autoload.php"
executionOrder="depends,defects"
beStrictAboutOutputDuringTests="true"
failOnRisky="true"
failOnWarning="true">

<testsuites>
<testsuite name="default">
<directory>./../tests</directory>
</testsuite>
</testsuites>


</phpunit>

0 comments on commit 4c09c55

Please sign in to comment.