Skip to content

Commit

Permalink
Upgrade CI for PHP 8.4 testing
Browse files Browse the repository at this point in the history
  • Loading branch information
alexander-schranz committed Jul 24, 2024
1 parent 110ba44 commit 2ec0fc1
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 12 deletions.
28 changes: 17 additions & 11 deletions .github/workflows/test-application.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,14 @@ jobs:
env:
SYMFONY_DEPRECATIONS_HELPER: weak

- php-version: '8.4'
dependency-versions: 'highest'
php-extensions: 'mysql, imagick'
tools: 'composer:v2'
composer-options: '--ignore-platform-reqs'
env:
SYMFONY_DEPRECATIONS_HELPER: weak

services:
mysql:
image: 'mysql:5.7'
Expand All @@ -69,7 +77,7 @@ jobs:
--health-timeout=5s --health-retries=5
steps:
- name: Checkout project
uses: actions/checkout@v2
uses: actions/checkout@v4

- name: Install and configure PHP
uses: shivammathur/setup-php@v2
Expand All @@ -79,23 +87,21 @@ jobs:
tools: '${{ matrix.tools }}'
coverage: none

- name: Remove not required tooling for tests
run: composer remove php-cs-fixer/shim "*phpstan*" --dev
- 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}}

- name: Bootstrap test environment
run: composer bootstrap-test-environment
env: '${{ matrix.env }}'

- name: Lint code
if: '${{ matrix.lint }}'
run: composer lint
env: '${{ matrix.env }}'

- name: Execute test cases
run: time composer test
env: '${{ matrix.env }}'
Expand All @@ -108,7 +114,7 @@ jobs:

steps:
- name: Checkout project
uses: actions/checkout@v2
uses: actions/checkout@v4

- name: Install and configure PHP
uses: shivammathur/setup-php@v2
Expand All @@ -119,7 +125,7 @@ jobs:
coverage: none

- name: Install composer dependencies
uses: ramsey/composer-install@v1
uses: ramsey/composer-install@v2
with:
dependency-versions: highest

Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
"phpstan/phpstan-doctrine": "^1.0",
"phpstan/phpstan-phpunit": "^1.0",
"phpstan/phpstan-symfony": "^1.0",
"phpunit/phpunit": "^8.0",
"phpunit/phpunit": "^8.5.39 || ^9.6.20 || ^10.0",
"php-cs-fixer/shim": "^3.0",
"symfony/browser-kit": "^4.3 || ^5.0 || ^6.0 || ^7.0",
"symfony/dotenv": "^4.3 || ^5.0 || ^6.0 || ^7.0",
Expand Down

0 comments on commit 2ec0fc1

Please sign in to comment.