upgrade PHPUnit

This commit is contained in:
Pig Fang 2020-10-13 11:06:35 +08:00
parent 986a64fe71
commit 2c226fb1fd
No known key found for this signature in database
GPG Key ID: A8198F548DADA9E2
4 changed files with 1640 additions and 906 deletions

View File

@ -48,20 +48,20 @@ jobs:
strategy:
fail-fast: false
matrix:
php: ['7.2', '7.3', '7.4']
php: ['7.4']
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Setup PHP only
uses: shivammathur/setup-php@v2
if: matrix.php != '7.2'
if: matrix.php != '7.4'
with:
php-version: ${{ matrix.php }}
coverage: none
extensions: mbstring, dom, fileinfo, sqlite, gd, zip
- name: Setup PHP with Xdebug
uses: shivammathur/setup-php@v2
if: matrix.php == '7.2'
if: matrix.php == '7.4'
with:
php-version: ${{ matrix.php }}
coverage: xdebug
@ -75,16 +75,16 @@ jobs:
- name: Install Composer dependencies
run: composer install --no-progress --no-suggest --prefer-dist --optimize-autoloader
- name: Run tests only
if: matrix.php != '7.2'
if: matrix.php != '7.4'
run: ./vendor/bin/phpunit
shell: pwsh
- name: Run tests with coverage report
if: matrix.php == '7.2'
if: matrix.php == '7.4'
run: ./vendor/bin/phpunit --coverage-clover=coverage.xml
shell: pwsh
- name: Upload coverage report
uses: codecov/codecov-action@v1
if: matrix.php == '7.2' && success()
if: matrix.php == '7.4' && success()
with:
token: ${{ secrets.CODECOV_TOKEN }}
name: github-actions

View File

@ -43,8 +43,7 @@
"laravel/browser-kit-testing": "^6.0",
"laravel/tinker": "^2.2",
"mockery/mockery": "1.3.*",
"phpdocumentor/reflection-docblock": "^5.1",
"phpunit/phpunit": "^8.5",
"phpunit/phpunit": "^9.4",
"symfony/css-selector": "^5.0",
"symfony/dom-crawler": "^5.0"
},

2506
composer.lock generated

File diff suppressed because it is too large Load Diff

View File

@ -1,27 +1,22 @@
<?xml version="1.0" encoding="UTF-8"?>
<phpunit colors="true"
backupStaticAttributes="false"
convertErrorsToExceptions="true"
convertNoticesToExceptions="true"
convertWarningsToExceptions="true"
bootstrap="vendor/autoload.php">
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" colors="true" backupStaticAttributes="false" convertErrorsToExceptions="true" convertNoticesToExceptions="true" convertWarningsToExceptions="true" bootstrap="vendor/autoload.php" xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/9.3/phpunit.xsd">
<coverage processUncoveredFiles="true">
<include>
<directory suffix=".php">./app</directory>
</include>
<exclude>
<directory suffix=".php">./app/Services/Cipher</directory>
</exclude>
</coverage>
<testsuites>
<testsuite name="Application Test Suite">
<directory suffix="Test.php">./tests</directory>
</testsuite>
</testsuites>
<filter>
<whitelist processUncoveredFilesFromWhitelist="true">
<directory suffix=".php">./app</directory>
<exclude>
<directory suffix=".php">./app/Services/Cipher</directory>
</exclude>
</whitelist>
</filter>
<php>
<env name="APP_ENV" value="testing"/>
</php>
<listeners>
<listener class="NunoMaduro\Collision\Adapters\Phpunit\Printer" />
<listener class="NunoMaduro\Collision\Adapters\Phpunit\Printer"/>
</listeners>
</phpunit>