-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
74 additions
and
53 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 |
---|---|---|
@@ -1,76 +1,93 @@ | ||
name: CI | ||
name: 'CI' | ||
|
||
on: | ||
push: | ||
branches: [ 'main' ] | ||
pull_request: ~ | ||
branches: ['main'] | ||
pull_request: | ||
branches: ['main'] | ||
schedule: | ||
- cron: '0 0 * * *' | ||
|
||
permissions: | ||
contents: read | ||
contents: 'read' | ||
|
||
jobs: | ||
test: | ||
name: "Build and Test - PHP ${{ matrix.php }} Symfony:${{ matrix.symfony-version }} ${{ matrix.deps }}" | ||
runs-on: ubuntu-latest | ||
env: | ||
SYMFONY_DEPRECATIONS_HELPER: max[direct]=0 | ||
strategy: | ||
matrix: | ||
include: | ||
- symfony-version: 6.4 | ||
php: 8.2 | ||
deps: low | ||
- symfony-version: 7.0 | ||
php: 8.2 | ||
deps: high | ||
- symfony-version: 7.0 | ||
php: 8.3 | ||
deps: high | ||
|
||
php-cs-fixer: | ||
name: 'PHP CS Fixer' | ||
runs-on: 'ubuntu-latest' | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: 'actions/checkout@v4' | ||
|
||
- name: Setup PHP | ||
uses: shivammathur/setup-php@v2 | ||
- name: 'Setup PHP' | ||
uses: 'shivammathur/setup-php@v2' | ||
with: | ||
php-version: '8.2' | ||
coverage: 'none' | ||
|
||
- name: Validate composer.json and composer.lock | ||
run: composer validate --strict | ||
- name: 'Install dependencies' | ||
uses: 'ramsey/composer-install@v3' | ||
|
||
- name: Setup PHP | ||
uses: shivammathur/setup-php@v2 | ||
with: | ||
php-version: ${{ matrix.php }} | ||
coverage: none | ||
- name: 'Run PHP CS Fixer' | ||
run: 'php vendor/bin/php-cs-fixer fix -v --dry-run' | ||
|
||
- name: Install dependencies | ||
if: matrix.deps == 'high' | ||
run: composer install | ||
phpstan: | ||
name: 'PHPStan' | ||
runs-on: 'ubuntu-latest' | ||
steps: | ||
- uses: 'actions/checkout@v4' | ||
|
||
- name: Install dependencies (min) | ||
if: matrix.deps == 'low' | ||
run: composer update --prefer-lowest --prefer-stable | ||
- name: 'Setup PHP' | ||
uses: 'shivammathur/setup-php@v2' | ||
with: | ||
php-version: '8.2' | ||
coverage: 'none' | ||
|
||
- name: Run test suite | ||
run: php vendor/bin/phpunit | ||
- name: 'Install dependencies' | ||
uses: 'ramsey/composer-install@v3' | ||
|
||
php-cs-fixer: | ||
name: PHP CS Fixer | ||
runs-on: ubuntu-latest | ||
- name: 'Run PHPStan' | ||
run: 'php vendor/bin/phpstan' | ||
|
||
test: | ||
name: 'Build and Test - PHP ${{ matrix.php }} - Symfony ${{ matrix.symfony-version }} ${{ matrix.deps }}' | ||
runs-on: 'ubuntu-latest' | ||
strategy: | ||
matrix: | ||
symfony-version: | ||
- '7.0' | ||
php: | ||
- '8.2' | ||
- '8.3' | ||
deps: | ||
- 'lowest' | ||
- 'highest' | ||
include: | ||
# LTS | ||
- symfony-version: '5.4' | ||
php: '8.2' | ||
deps: 'lowest' | ||
- symfony-version: '6.4' | ||
php: '8.2' | ||
deps: 'lowest' | ||
env: | ||
SYMFONY_REQUIRE: '${{ matrix.symfony-version }}' | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: 'actions/checkout@v4' | ||
|
||
- name: Setup PHP | ||
uses: shivammathur/setup-php@v2 | ||
- name: 'Setup PHP' | ||
uses: 'shivammathur/setup-php@v2' | ||
with: | ||
php-version: 8.2 | ||
coverage: none | ||
php-version: '${{ matrix.php }}' | ||
coverage: 'none' | ||
|
||
- name: Install dependencies | ||
run: composer install | ||
- name: 'Validate composer.json and composer.lock' | ||
run: 'composer validate --strict' | ||
|
||
- name: Run PHP CS Fixer | ||
run: php vendor/bin/php-cs-fixer fix -v --dry-run --stop-on-violation | ||
- name: 'Install dependencies' | ||
uses: 'ramsey/composer-install@v3' | ||
with: | ||
dependency-versions: '${{ matrix.deps }}' | ||
|
||
- name: Run test suite | ||
run: php vendor/bin/phpstan | ||
- name: 'Run test suite' | ||
run: 'php vendor/bin/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