Skip to content

Commit ba488a4

Browse files
committed
chore: add testing with lowest dependency
1 parent bf80875 commit ba488a4

File tree

1 file changed

+16
-3
lines changed

1 file changed

+16
-3
lines changed

.github/workflows/phpunit.yml

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,20 +18,29 @@ on:
1818
- 'phpunit*'
1919
- '.github/workflows/phpunit.yml'
2020

21+
env:
22+
COMPOSER_UPDATE_FLAGS: ""
23+
2124
jobs:
2225
main:
23-
name: PHP ${{ matrix.php-versions }} - ${{ matrix.db-platforms }}
26+
name: PHP ${{ matrix.php-versions }} - ${{ matrix.db-platforms }} - ${{ matrix.dependencies }}
2427
runs-on: ubuntu-latest
2528
if: "!contains(github.event.head_commit.message, '[ci skip]')"
2629
strategy:
2730
matrix:
2831
php-versions: ['7.4', '8.0', '8.1']
2932
db-platforms: ['MySQLi', 'Postgre', 'SQLite3', 'SQLSRV', 'OCI8']
3033
mysql-versions: [ '5.7' ]
34+
dependencies: ['highest']
3135
include:
3236
- php-versions: '7.4'
3337
db-platforms: MySQLi
3438
mysql-versions: '8.0'
39+
dependencies: 'highest'
40+
- php-versions: '7.4'
41+
db-platforms: MySQLi
42+
mysql-versions: '5.7'
43+
dependencies: 'lowest'
3544

3645
services:
3746
mysql:
@@ -121,12 +130,16 @@ jobs:
121130
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }}-${{ hashFiles('**/composer.lock') }}
122131
restore-keys: ${{ runner.os }}-composer-
123132

133+
- name: Handle lowest dependencies update
134+
if: contains(matrix.dependencies, 'lowest')
135+
run: echo "COMPOSER_UPDATE_FLAGS=$COMPOSER_UPDATE_FLAGS --prefer-lowest" >> $GITHUB_ENV
136+
124137
- name: Install dependencies
125138
run: |
126139
if [ -f composer.lock ]; then
127-
composer install --no-progress --no-interaction --prefer-dist --optimize-autoloader
140+
composer install ${{ env.COMPOSER_UPDATE_FLAGS }} --no-progress --no-interaction --prefer-dist --optimize-autoloader
128141
else
129-
composer update --no-progress --no-interaction --prefer-dist --optimize-autoloader
142+
composer update ${{ env.COMPOSER_UPDATE_FLAGS }} --no-progress --no-interaction --prefer-dist --optimize-autoloader
130143
fi
131144
132145
- name: Test with PHPUnit

0 commit comments

Comments
 (0)