-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This PR was squashed before being merged into the 1.2-dev branch. Discussion ---------- | Q | A | ------------- | --- | Bug fix? | no | New feature? | yes | BC breaks? | no | Deprecations? | no | Fixed tickets | | License | MIT Commits ------- d1d45e2 Allow Symfony 7 a520dfc -
- Loading branch information
Showing
8 changed files
with
149 additions
and
84 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
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,4 +1,5 @@ | ||
name: Full CI process | ||
name: 'CI' | ||
|
||
on: | ||
push: | ||
branches: | ||
|
@@ -8,92 +9,159 @@ on: | |
- main | ||
|
||
jobs: | ||
test: | ||
name: PHP ${{ matrix.PHP_VERSION }} | ||
runs-on: ubuntu-18.04 | ||
cs-fixer: | ||
name: 'PHP CS Fixer' | ||
|
||
runs-on: 'ubuntu-latest' | ||
|
||
strategy: | ||
fail-fast: false | ||
matrix: | ||
include: | ||
- PHP_VERSION: '7.4' | ||
SYMFONY_REQUIRE: '^5.0' | ||
- PHP_VERSION: '7.4' | ||
SYMFONY_REQUIRE: '^5.2' | ||
- PHP_VERSION: '8.0' | ||
- PHP_VERSION: '8.0' | ||
SYMFONY_REQUIRE: '^6.0' | ||
php-version: | ||
- '8.2' | ||
|
||
steps: | ||
# —— Setup Github actions 🐙 ————————————————————————————————————————————— | ||
# https://github.com/actions/checkout (official) | ||
- | ||
name: Checkout | ||
uses: actions/checkout@v2 | ||
name: 'Check out' | ||
uses: 'actions/checkout@v2' | ||
|
||
# https://github.com/shivammathur/setup-php (community) | ||
- | ||
name: Setup PHP, extensions and composer with shivammathur/setup-php | ||
uses: shivammathur/setup-php@v2 | ||
name: 'Set up PHP' | ||
uses: 'shivammathur/setup-php@v2' | ||
with: | ||
php-version: ${{ matrix.PHP_VERSION }} | ||
extensions: mbstring, ctype, iconv, filter, json | ||
coverage: none | ||
env: | ||
update: true | ||
php-version: '${{ matrix.php-version }}' | ||
coverage: 'none' | ||
|
||
# —— Composer 🧙️ ————————————————————————————————————————————————————————— | ||
- | ||
name: Install Composer dependencies | ||
env: | ||
SYMFONY_REQUIRE: ${{ matrix.SYMFONY_REQUIRE }} | ||
SYMFONY_PHPUNIT_DISABLE_RESULT_CACHE: 1 | ||
run: | | ||
git config --global author.name Sebastiaan Stok | ||
git config --global author.email [email protected] | ||
git config --global user.name Sebastiaan Stok | ||
git config --global user.email [email protected] | ||
name: 'Get Composer cache directory' | ||
id: 'composer-cache' | ||
run: 'echo "::set-output name=cache-dir::$(composer config cache-files-dir)"' | ||
|
||
rm -f composer.lock | ||
composer global config --no-plugins allow-plugins.symfony/flex true | ||
composer config --no-plugins allow-plugins.symfony/flex true | ||
composer global require symfony/flex | ||
composer install --no-progress --no-interaction --no-suggest --optimize-autoloader --ansi | ||
- | ||
name: 'Cache dependencies' | ||
uses: 'actions/cache@v2' | ||
with: | ||
path: '${{ steps.composer-cache.outputs.cache-dir }}' | ||
key: "php-${{ matrix.php-version }}-composer-locked-${{ hashFiles('composer.lock') }}" | ||
restore-keys: 'php-${{ matrix.php-version }}-composer-locked-' | ||
|
||
## —— Tests ✅ ——————————————————————————————————————————————————————————— | ||
- | ||
name: Run Tests | ||
run: | | ||
make test | ||
lint: | ||
name: PHP-QA | ||
runs-on: ubuntu-latest | ||
name: 'Install dependencies' | ||
run: 'composer update --no-progress --prefer-stable' | ||
|
||
- | ||
name: 'Check the code style' | ||
run: 'make cs-full' | ||
|
||
phpstan: | ||
name: 'PhpStan' | ||
|
||
runs-on: 'ubuntu-latest' | ||
|
||
strategy: | ||
fail-fast: false | ||
matrix: | ||
php-version: | ||
- '8.2' | ||
|
||
steps: | ||
- | ||
name: Checkout | ||
uses: actions/checkout@v2 | ||
name: 'Check out' | ||
uses: 'actions/checkout@v2' | ||
|
||
- | ||
name: 'Set up PHP' | ||
uses: 'shivammathur/setup-php@v2' | ||
with: | ||
php-version: '${{ matrix.php-version }}' | ||
coverage: 'none' | ||
|
||
- | ||
name: 'Get Composer cache directory' | ||
id: 'composer-cache' | ||
run: 'echo "::set-output name=cache-dir::$(composer config cache-files-dir)"' | ||
|
||
# https://github.com/shivammathur/setup-php (community) | ||
- | ||
name: Setup PHP, extensions and composer with shivammathur/setup-php | ||
uses: shivammathur/setup-php@v2 | ||
name: 'Cache dependencies' | ||
uses: 'actions/cache@v2' | ||
with: | ||
php-version: '7.4' | ||
extensions: mbstring, ctype, iconv, filter, json | ||
coverage: none | ||
path: '${{ steps.composer-cache.outputs.cache-dir }}' | ||
key: "php-${{ matrix.php-version }}-composer-locked-${{ hashFiles('composer.lock') }}" | ||
restore-keys: 'php-${{ matrix.php-version }}-composer-locked-' | ||
|
||
- | ||
name: 'Install dependencies' | ||
run: 'composer update --no-progress --prefer-stable' | ||
|
||
# —— Composer 🧙️ ————————————————————————————————————————————————————————— | ||
- | ||
name: Install Composer dependencies | ||
name: 'Run PhpStan' | ||
run: 'vendor/bin/phpstan analyze --no-progress' | ||
|
||
tests: | ||
name: 'PHPUnit' | ||
|
||
runs-on: 'ubuntu-latest' | ||
|
||
strategy: | ||
matrix: | ||
include: | ||
- | ||
php-version: '8.0' | ||
composer-options: '--prefer-stable' | ||
symfony-version: '5.4' | ||
|
||
- | ||
php-version: '8.0' | ||
composer-options: '--prefer-stable' | ||
symfony-version: '6.0' | ||
- | ||
php-version: '8.2' | ||
composer-options: '--prefer-stable' | ||
symfony-version: '^6.4' | ||
|
||
- | ||
php-version: '8.2' | ||
composer-options: '--prefer-stable' | ||
symfony-version: '^7.0' | ||
|
||
steps: | ||
- | ||
name: 'Check out' | ||
uses: 'actions/checkout@v2' | ||
|
||
- | ||
name: 'Set up PHP' | ||
uses: 'shivammathur/setup-php@v2' | ||
with: | ||
php-version: '${{ matrix.php-version }}' | ||
coverage: 'none' | ||
|
||
- | ||
name: 'Get Composer cache directory' | ||
id: 'composer-cache' | ||
run: 'echo "::set-output name=cache-dir::$(composer config cache-files-dir)"' | ||
|
||
- | ||
name: 'Cache dependencies' | ||
uses: 'actions/cache@v2' | ||
with: | ||
path: '${{ steps.composer-cache.outputs.cache-dir }}' | ||
key: "php-${{ matrix.php-version }}-composer-locked-${{ hashFiles('composer.lock') }}" | ||
restore-keys: 'php-${{ matrix.php-version }}-composer-locked-' | ||
|
||
- | ||
name: 'Install dependencies' | ||
env: | ||
COMPOSER_OPTIONS: '${{ matrix.composer-options }}' | ||
SYMFONY_REQUIRE: '${{ matrix.symfony-version }}' | ||
run: | | ||
rm -f composer.lock | ||
composer global config --no-plugins allow-plugins.symfony/flex true | ||
composer config --no-plugins allow-plugins.symfony/flex true | ||
composer global require symfony/flex | ||
composer install --no-progress --no-interaction --no-suggest --optimize-autoloader --ansi | ||
composer global require --no-progress --no-scripts --no-plugins symfony/flex | ||
composer update --no-progress $COMPOSER_OPTIONS | ||
- | ||
name: 'Install PHPUnit' | ||
run: 'vendor/bin/simple-phpunit install' | ||
|
||
- | ||
name: Run PHP-QA | ||
name: 'Run tests' | ||
run: | | ||
make lint | ||
vendor/bin/simple-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
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