Skip to content

Commit e43a2ae

Browse files
committed
[CI] Rework tests-php matrix, re-use separate properties, reduce to 1 the number of "dev" jobs
1 parent c29568f commit e43a2ae

File tree

1 file changed

+17
-32
lines changed

1 file changed

+17
-32
lines changed

.github/workflows/test.yaml

Lines changed: 17 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -59,46 +59,31 @@ jobs:
5959
strategy:
6060
fail-fast: false
6161
matrix:
62-
config:
63-
# Minimum supported PHP versions, LTS Symfony versions, with highest deps
64-
- PHP_VERSION: '8.1'
65-
SYMFONY_VERSION: '6.4.*'
66-
67-
# Minimum supported PHP versions, with highest and lowest deps
68-
- PHP_VERSION: '8.1'
69-
- PHP_VERSION: '8.1'
70-
COMPOSER_FLAGS: --prefer-lowest
71-
- PHP_VERSION: '8.2'
72-
- PHP_VERSION: '8.3'
73-
- PHP_VERSION: '8.4'
74-
75-
# Multiple PHP versions, major Symfony development versions
76-
- PHP_VERSION: '8.1'
77-
SYMFONY_VERSION: '6.*'
78-
MINIMUM_STABILITY: dev
79-
80-
- PHP_VERSION: '8.2'
81-
SYMFONY_VERSION: '7.*'
82-
MINIMUM_STABILITY: dev
83-
84-
- PHP_VERSION: '8.3'
85-
SYMFONY_VERSION: '7.*'
86-
MINIMUM_STABILITY: dev
87-
88-
- PHP_VERSION: '8.4'
89-
SYMFONY_VERSION: '7.*'
90-
MINIMUM_STABILITY: dev
62+
php-version: ['8.1', '8.2', '8.3', '8.4']
63+
composer-flags: ['']
64+
symfony-version: ['']
65+
minimum-stability: ['stable']
66+
include:
67+
# dev packages (probably not needed to have multiple such jobs)
68+
- minimum-stability: 'dev'
69+
php-version: '8.4'
70+
# lowest deps
71+
- php-version: '8.1'
72+
composer-flags: '--prefer-lowest'
73+
# LTS version of Symfony
74+
- php-version: '8.1'
75+
symfony-version: '6.4.*'
9176

9277
env:
93-
SYMFONY_REQUIRE: ${{ matrix.config.SYMFONY_VERSION }}
78+
SYMFONY_REQUIRE: ${{ matrix.symfony-version }}
9479
steps:
9580
- uses: actions/checkout@v4
9681

9782
- name: Configure environment
9883
run: |
9984
echo COLUMNS=120 >> $GITHUB_ENV
100-
echo COMPOSER_MIN_STAB='composer config minimum-stability ${{ matrix.config.MINIMUM_STABILITY || 'stable' }} --ansi' >> $GITHUB_ENV
101-
echo COMPOSER_UP='composer update ${{ matrix.config.COMPOSER_FLAGS || '' }} --no-progress --no-interaction --ansi' >> $GITHUB_ENV
85+
echo COMPOSER_MIN_STAB='composer config minimum-stability ${{ matrix.minimum-stability || 'stable' }} --ansi' >> $GITHUB_ENV
86+
echo COMPOSER_UP='composer update ${{ matrix.composer-flags }} --no-progress --no-interaction --ansi' >> $GITHUB_ENV
10287
echo PHPUNIT='vendor/bin/simple-phpunit' >> $GITHUB_ENV
10388
10489
# Swup and Typed have no tests, Turbo has its own workflow file

0 commit comments

Comments
 (0)