-
Notifications
You must be signed in to change notification settings - Fork 25
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #140 from alexander-schranz/enhancement/ci-update
Fix Ci for Sulu 2.6 and adjust CI script for PHP 8.3 and Linting
- Loading branch information
Showing
74 changed files
with
905 additions
and
62 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 |
---|---|---|
|
@@ -9,7 +9,7 @@ on: | |
|
||
jobs: | ||
test: | ||
name: 'PHP ${{ matrix.php-version }} (${{ matrix.dependency-versions }}, Lint ${{ matrix.lint }})' | ||
name: 'PHP ${{ matrix.php-version }} (${{ matrix.dependency-versions }})' | ||
runs-on: ubuntu-latest | ||
|
||
env: | ||
|
@@ -22,31 +22,41 @@ jobs: | |
matrix: | ||
include: | ||
- php-version: '7.3' | ||
lint: false | ||
coverage: false | ||
dependency-versions: 'lowest' | ||
tools: 'composer:v1' | ||
tools: 'composer:v2' | ||
env: | ||
SYMFONY_DEPRECATIONS_HELPER: disabled | ||
|
||
- php-version: '7.4' | ||
lint: true | ||
coverage: true | ||
dependency-versions: 'highest' | ||
tools: 'composer:v2' | ||
env: | ||
SYMFONY_DEPRECATIONS_HELPER: weak | ||
|
||
- php-version: '8.0' | ||
lint: false | ||
coverage: false | ||
dependency-versions: 'highest' | ||
tools: 'composer:v2' | ||
env: | ||
SYMFONY_DEPRECATIONS_HELPER: weak | ||
|
||
- php-version: '8.1' | ||
lint: false | ||
coverage: false | ||
dependency-versions: 'highest' | ||
tools: 'composer:v2' | ||
env: | ||
SYMFONY_DEPRECATIONS_HELPER: weak | ||
|
||
- php-version: '8.2' | ||
coverage: false | ||
dependency-versions: 'highest' | ||
tools: 'composer:v2' | ||
env: | ||
SYMFONY_DEPRECATIONS_HELPER: weak | ||
|
||
- php-version: '8.3' | ||
coverage: false | ||
dependency-versions: 'highest' | ||
tools: 'composer:v2' | ||
|
@@ -64,7 +74,7 @@ jobs: | |
|
||
steps: | ||
- name: Checkout project | ||
uses: actions/checkout@v2 | ||
uses: actions/checkout@v4 | ||
|
||
- name: Install and configure PHP | ||
uses: shivammathur/setup-php@v2 | ||
|
@@ -74,19 +84,18 @@ jobs: | |
coverage: pcov | ||
tools: ${{ matrix.tools }} | ||
|
||
- name: Remove not required test tooling | ||
run: composer remove "*php-cs-fixer*" "*phpstan*" --no-update --dev | ||
|
||
- name: Install composer dependencies | ||
uses: ramsey/composer-install@v1 | ||
uses: ramsey/composer-install@v3 | ||
with: | ||
dependency-versions: ${{ matrix.dependency-versions }} | ||
composer-options: ${{ matrix.composer-options }} | ||
|
||
- name: Bootstrap test environment | ||
run: composer bootstrap-test-environment | ||
|
||
- name: Lint code | ||
if: ${{ matrix.lint }} | ||
run: composer lint | ||
|
||
- name: Execute unit test cases | ||
run: composer test -- Tests/Unit --coverage-php var/coverage.php --coverage-html coverage-report --log-junit var/junit.xml | ||
|
||
|
@@ -96,3 +105,31 @@ jobs: | |
- name: Check code coverage | ||
if: ${{ matrix.coverage }} | ||
run: php vendor/bin/code-coverage-checker "var/coverage.php" "line" "95" "Content" | ||
|
||
lint: | ||
name: 'PHP Lint' | ||
runs-on: ubuntu-latest | ||
|
||
env: | ||
DATABASE_URL: mysql://root:[email protected]:3306/su_headless_test?serverVersion=5.7 | ||
DATABASE_CHARSET: utf8mb4 | ||
DATABASE_COLLATE: utf8mb4_unicode_ci | ||
|
||
steps: | ||
- name: Checkout project | ||
uses: actions/checkout@v4 | ||
|
||
- name: Install and configure PHP | ||
uses: shivammathur/setup-php@v2 | ||
with: | ||
php-version: 8.3 | ||
extensions: ctype, iconv, mysql | ||
tools: highest | ||
|
||
- name: Install composer dependencies | ||
uses: ramsey/composer-install@v3 | ||
with: | ||
dependency-versions: highest | ||
|
||
- name: Lint code | ||
run: composer lint |
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
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
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
Oops, something went wrong.