Skip to content

Commit

Permalink
Improve conditions for job matrix
Browse files Browse the repository at this point in the history
  • Loading branch information
Wirone committed Oct 26, 2023
1 parent 1cf827a commit f91a629
Showing 1 changed file with 14 additions and 13 deletions.
27 changes: 14 additions & 13 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,24 +26,24 @@ jobs:
- operating-system: 'ubuntu-20.04'
php-version: '7.4'
job-description: 'Fixer with lowest deps'
fixer-mode: 'standard'
run-fixer: 'yes'
composer-flags: '--prefer-stable --prefer-lowest' # should be checked on the lowest supported PHP version

- operating-system: 'ubuntu-20.04'
php-version: '7.4'
job-description: 'Fixer with PHPDoc to type rules'
fixer-mode: 'phpdoc-to-type-rules' # should be checked on the lowest supported PHP version
run-phpdoc-to-native-type: 'yes' # should be checked on the lowest supported PHP version

- operating-system: 'ubuntu-20.04'
php-version: '7.4'
job-description: 'Fixer with Symfony ^5'
fixer-mode: 'standard'
run-fixer: 'yes'
execute-flex-with-symfony-version: '^5' # explicit check for Symfony 5.x compatibility

- operating-system: 'ubuntu-20.04'
php-version: '8.0'
job-description: 'Fixer'
fixer-mode: 'standard'
run-fixer: 'yes'

- operating-system: 'ubuntu-20.04'
php-version: '8.0'
Expand All @@ -53,7 +53,7 @@ jobs:
- operating-system: 'ubuntu-20.04'
php-version: '8.1'
job-description: 'Fixer with Symfony ^6'
fixer-mode: 'standard'
run-fixer: 'yes'
execute-flex-with-symfony-version: '^6' # explicit check for Symfony 6.x compatibility

- operating-system: 'ubuntu-20.04'
Expand All @@ -65,12 +65,13 @@ jobs:
- operating-system: 'ubuntu-20.04'
php-version: '8.2'
job-description: 'Fixer'
fixer-mode: 'standard'
run-fixer: 'yes'

- operating-system: 'ubuntu-20.04'
php-version: '8.2'
job-description: 'with migration rules'
fixer-mode: 'migration-rules' # should be checked on the highest supported PHP version
run-fixer: 'yes'
run-migration-rules: 'yes' # should be checked on the highest supported PHP version

- operating-system: 'ubuntu-20.04'
php-version: '8.2'
Expand All @@ -96,7 +97,7 @@ jobs:
- operating-system: 'windows-latest'
php-version: '8.2'
job-description: 'Fixer on Windows'
fixer-mode: 'standard'
run-fixer: 'yes'
FAST_LINT_TEST_CASES: 1

- operating-system: 'windows-latest'
Expand All @@ -108,7 +109,7 @@ jobs:
- operating-system: 'macos-latest'
php-version: '8.2'
job-description: 'Fixer on macOS'
fixer-mode: 'standard'
run-fixer: 'yes'
FAST_LINT_TEST_CASES: 1

- operating-system: 'macos-latest'
Expand All @@ -120,7 +121,7 @@ jobs:
- operating-system: 'ubuntu-22.04'
php-version: '8.3'
job-description: 'Fixer'
fixer-mode: 'standard'
run-fixer: 'yes'
composer-flags: '--ignore-platform-req=PHP'
PHP_CS_FIXER_IGNORE_ENV: 1

Expand Down Expand Up @@ -190,7 +191,7 @@ jobs:
# execute migration rules before running tests and self-fixing,
# so that we know that our codebase is future-ready
- name: Run PHP CS Fixer with migration rules
if: matrix.fixer-mode == 'migration-rules'
if: matrix.run-migration-rules == 'yes'
run: php php-cs-fixer fix --config .php-cs-fixer.php-highest.php -q

- name: Disable time limit for tests when collecting coverage
Expand All @@ -217,11 +218,11 @@ jobs:
run: php vendor/bin/php-coveralls --verbose

- name: Run PHP CS Fixer with PHPDoc to type rules
if: matrix.fixer-mode == 'phpdoc-to-type-rules'
if: matrix.run-phpdoc-to-native-type == 'yes'
run: php php-cs-fixer check --diff -v --config .php-cs-fixer.php-lowest.php

- name: Run PHP CS Fixer
if: matrix.fixer-mode == 'standard'
if: matrix.run-fixer == 'yes'
env:
PHP_CS_FIXER_IGNORE_ENV: ${{ matrix.PHP_CS_FIXER_IGNORE_ENV }}
PHP_CS_FIXER_FUTURE_MODE: 1
Expand Down

0 comments on commit f91a629

Please sign in to comment.