-
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
- Loading branch information
1 parent
f5db9a5
commit 64031e3
Showing
5 changed files
with
60 additions
and
24 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,7 +146,7 @@ jobs: | |
|
||
steps: | ||
- name: Checkout project | ||
uses: actions/checkout@v2 | ||
uses: actions/checkout@v4 | ||
|
||
- name: Install and configure PHP | ||
uses: shivammathur/setup-php@v2 | ||
|
@@ -142,7 +157,7 @@ jobs: | |
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
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> |