-
Notifications
You must be signed in to change notification settings - Fork 78
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Upgrade PHPUnit and add PHP 8.4 to CI (#391)
- Loading branch information
1 parent
f5db9a5
commit 91b7157
Showing
14 changed files
with
101 additions
and
30 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -20,6 +20,7 @@ jobs: | |
database: postgres | ||
dependency-versions: 'lowest' | ||
tools: 'composer:v2' | ||
phpunit-config: 'phpunit-9.xml.dist' | ||
env: | ||
SYMFONY_DEPRECATIONS_HELPER: disabled | ||
DATABASE_URL: postgres://postgres:[email protected]/sulu_form_test?serverVersion=12.5 | ||
|
@@ -30,6 +31,7 @@ jobs: | |
database: mysql | ||
dependency-versions: 'highest' | ||
tools: 'composer:v2' | ||
phpunit-config: 'phpunit-9.xml.dist' | ||
env: | ||
SYMFONY_DEPRECATIONS_HELPER: weak | ||
DATABASE_URL: mysql://root:[email protected]/sulu_form_test?serverVersion=5.7 | ||
|
@@ -57,6 +59,16 @@ jobs: | |
DATABASE_COLLATE: utf8mb4_unicode_ci | ||
|
||
- php-version: '8.2' | ||
database: postgres | ||
dependency-versions: 'highest' | ||
tools: 'composer:v2' | ||
env: | ||
SYMFONY_DEPRECATIONS_HELPER: weak | ||
DATABASE_URL: postgres://postgres:[email protected]/sulu_form_test?serverVersion=12.5 | ||
DATABASE_CHARSET: UTF8 | ||
DATABASE_COLLATE: | ||
|
||
- php-version: '8.3' | ||
database: mysql | ||
dependency-versions: 'highest' | ||
tools: 'composer:v2' | ||
|
@@ -66,10 +78,11 @@ jobs: | |
DATABASE_CHARSET: utf8mb4 | ||
DATABASE_COLLATE: utf8mb4_unicode_ci | ||
|
||
- php-version: '8.3' | ||
- php-version: '8.4' | ||
database: mysql | ||
dependency-versions: 'highest' | ||
tools: 'composer:v2' | ||
composer-options: '--ignore-platform-reqs' | ||
env: | ||
SYMFONY_DEPRECATIONS_HELPER: weak | ||
DATABASE_URL: mysql://root:[email protected]/sulu_form_test?serverVersion=5.7 | ||
|
@@ -96,7 +109,7 @@ jobs: | |
|
||
steps: | ||
- name: Checkout project | ||
uses: actions/checkout@v2 | ||
uses: actions/checkout@v4 | ||
|
||
- name: Install and configure PHP | ||
uses: shivammathur/setup-php@v2 | ||
|
@@ -106,11 +119,13 @@ jobs: | |
tools: ${{ matrix.tools }} | ||
coverage: none | ||
|
||
- name: Remove not required tooling for tests | ||
run: composer remove php-cs-fixer/shim "*phpstan*" --dev --no-update | ||
- name: Remove Lint Tools | ||
# These tools are not required to run tests, so we are removing them to improve dependency resolving and | ||
# testing lowest versions. | ||
run: composer remove "*php-cs-fixer*" "*phpstan*" "*rector*" --dev --no-update | ||
|
||
- name: Install composer dependencies | ||
uses: ramsey/composer-install@v1 | ||
uses: ramsey/composer-install@v2 | ||
with: | ||
dependency-versions: ${{matrix.dependency-versions}} | ||
composer-options: ${{ matrix.composer-options }} | ||
|
@@ -120,7 +135,7 @@ jobs: | |
env: ${{ matrix.env }} | ||
|
||
- name: Execute test cases | ||
run: time composer test | ||
run: time composer test -- --config ${{ matrix.phpunit-config || 'phpunit.xml.dist' }} | ||
env: ${{ matrix.env }} | ||
|
||
lint: | ||
|
@@ -131,18 +146,18 @@ jobs: | |
|
||
steps: | ||
- name: Checkout project | ||
uses: actions/checkout@v2 | ||
uses: actions/checkout@v4 | ||
|
||
- name: Install and configure PHP | ||
uses: shivammathur/setup-php@v2 | ||
with: | ||
php-version: 8.1 | ||
php-version: 8.3 | ||
extensions: 'imagick' | ||
tools: 'composer:v2' | ||
coverage: none | ||
|
||
- name: Install composer dependencies | ||
uses: ramsey/composer-install@v1 | ||
uses: ramsey/composer-install@v2 | ||
with: | ||
dependency-versions: ${{matrix.dependency-versions}} | ||
composer-options: ${{ matrix.composer-options }} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
<?php | ||
|
||
/* | ||
* This file is part of Sulu. | ||
* | ||
* (c) Sulu GmbH | ||
* | ||
* This source file is subject to the MIT license that is bundled | ||
* with this source code in the file LICENSE. | ||
*/ | ||
|
||
namespace Prophecy\PhpUnit; | ||
|
||
/** | ||
* @internal | ||
*/ | ||
trait ProphecyTrait | ||
{ | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<phpunit colors="true" bootstrap="Tests/test-bootstrap.php"> | ||
<testsuites> | ||
<testsuite name="Sulu Form Bundle"> | ||
<directory>./Tests</directory> | ||
</testsuite> | ||
</testsuites> | ||
|
||
<filter> | ||
<whitelist addUncoveredFilesFromWhitelist="true"> | ||
<directory>.</directory> | ||
<exclude> | ||
<directory>Resources/</directory> | ||
<directory>Tests/</directory> | ||
<directory>vendor/</directory> | ||
</exclude> | ||
</whitelist> | ||
</filter> | ||
|
||
<php> | ||
<env name="KERNEL_CLASS" value="Sulu\Bundle\FormBundle\Tests\Application\Kernel"/> | ||
<env name="APP_ENV" value="test" force="true"/> | ||
</php> | ||
</phpunit> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,24 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<phpunit colors="true" bootstrap="Tests/test-bootstrap.php"> | ||
<testsuites> | ||
<testsuites> | ||
<testsuite name="Sulu Form Bundle"> | ||
<directory>./Tests</directory> | ||
</testsuite> | ||
</testsuites> | ||
|
||
<filter> | ||
<whitelist addUncoveredFilesFromWhitelist="true"> | ||
<directory>.</directory> | ||
<exclude> | ||
<directory>Resources/</directory> | ||
<directory>Tests/</directory> | ||
<directory>vendor/</directory> | ||
</exclude> | ||
</whitelist> | ||
</filter> | ||
|
||
<php> | ||
<env name="KERNEL_CLASS" value="Sulu\Bundle\FormBundle\Tests\Application\Kernel"/> | ||
<env name="APP_ENV" value="test" force="true"/> | ||
<env name="SYMFONY_DEPRECATIONS_HELPER" value="weak"/> | ||
</php> | ||
|
||
<source> | ||
<include> | ||
<directory>./</directory> | ||
</include> | ||
<exclude> | ||
<directory>Resources/</directory> | ||
<directory>Tests/</directory> | ||
<directory>vendor/</directory> | ||
</exclude> | ||
</source> | ||
</phpunit> |