Skip to content

Commit b933c7c

Browse files
committed
[CI] Explicit the matrix for tests-php job
1 parent 29556ae commit b933c7c

File tree

1 file changed

+42
-19
lines changed

1 file changed

+42
-19
lines changed

.github/workflows/test.yaml

Lines changed: 42 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -56,35 +56,58 @@ jobs:
5656
5757
tests-php:
5858
runs-on: ubuntu-latest
59-
name: "PHP ${{ matrix.php-version }} - Symfony ${{ matrix.symfony-version }} - ${{ matrix.minimum-stability }} ${{ matrix.dependency-version }} deps"
6059
strategy:
6160
fail-fast: false
6261
matrix:
63-
php-version: ['8.1', '8.3', '8.4']
64-
symfony-version: ['6.4.x', '7.2.x']
65-
minimum-stability: ['stable', 'dev']
66-
dependency-version: ['lowest', 'highest']
67-
exclude:
68-
- php-version: '8.1'
69-
minimum-stability: 'dev'
70-
- php-version: '8.3'
71-
minimum-stability: 'dev'
72-
- php-version: '8.1'
73-
dependency-version: 'highest'
74-
- php-version: '8.3'
75-
dependency-version: 'lowest'
76-
- php-version: '8.4'
77-
dependency-version: 'lowest'
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+
72+
- PHP_VERSION: '8.2'
73+
- PHP_VERSION: '8.2'
74+
COMPOSER_FLAGS: --prefer-lowest
75+
76+
- PHP_VERSION: '8.3'
77+
- PHP_VERSION: '8.3'
78+
COMPOSER_FLAGS: --prefer-lowest
79+
80+
- PHP_VERSION: '8.4'
81+
- PHP_VERSION: '8.4'
82+
COMPOSER_FLAGS: --prefer-lowest
83+
84+
# Multiple PHP versions, major Symfony development versions
85+
- PHP_VERSION: '8.1'
86+
SYMFONY_VERSION: '6.*'
87+
MINIMUM_STABILITY: dev
88+
89+
- PHP_VERSION: '8.2'
90+
SYMFONY_VERSION: '7.*'
91+
MINIMUM_STABILITY: dev
92+
93+
- PHP_VERSION: '8.3'
94+
SYMFONY_VERSION: '7.*'
95+
MINIMUM_STABILITY: dev
96+
97+
- PHP_VERSION: '8.4'
98+
SYMFONY_VERSION: '7.*'
99+
MINIMUM_STABILITY: dev
100+
78101
env:
79-
SYMFONY_REQUIRE: ${{ matrix.config.symfony-version }}
102+
SYMFONY_REQUIRE: ${{ matrix.config.SYMFONY_VERSION }}
80103
steps:
81104
- uses: actions/checkout@v4
82105

83106
- name: Configure environment
84107
run: |
85108
echo COLUMNS=120 >> $GITHUB_ENV
86-
echo COMPOSER_MIN_STAB='composer config minimum-stability ${{ matrix.minimum-stability }}) --ansi' >> $GITHUB_ENV
87-
echo COMPOSER_UP='composer update ${{ matrix.dependency-version == 'lowest' && '--prefer-lowest' }} --no-progress --ansi' >> $GITHUB_ENV
109+
echo COMPOSER_MIN_STAB='composer config minimum-stability ${{ matrix.config.MINIMUM_STABILITY || 'stable' }} --ansi' >> $GITHUB_ENV
110+
echo COMPOSER_UP='composer update ${{ matrix.config.COMPOSER_FLAGS || '' }} --no-progress --no-interaction --ansi' >> $GITHUB_ENV
88111
echo PHPUNIT='vendor/bin/simple-phpunit' >> $GITHUB_ENV
89112
# TODO: exclude Swup Turbo Typed
90113
echo PACKAGES=$(find src/ -mindepth 2 -type f -name composer.json -not -path "*/vendor/*" -printf '%h\n' | jq -R -s -c 'split("\n")[:-1] | map(. | sub("^src/";"")) | sort') >> $GITHUB_OUTPUT

0 commit comments

Comments
 (0)