|
20 | 20 |
|
21 | 21 | jobs: |
22 | 22 | main: |
23 | | - name: PHP ${{ matrix.php-versions }} - ${{ matrix.db-platforms }} |
| 23 | + name: PHP ${{ matrix.php-versions }} - ${{ matrix.db-platforms }} - ${{ matrix.dependencies }} |
24 | 24 | runs-on: ubuntu-latest |
25 | 25 | if: "!contains(github.event.head_commit.message, '[ci skip]')" |
26 | 26 | strategy: |
27 | 27 | matrix: |
28 | | - php-versions: ['7.4', '8.0', '8.1'] |
29 | | - db-platforms: ['MySQLi', 'Postgre', 'SQLite3', 'SQLSRV', 'OCI8'] |
30 | | - mysql-versions: [ '5.7' ] |
| 28 | + php-versions: ['7.4', '8.0', '8.1', '8.2'] |
| 29 | + db-platforms: ['MySQLi', 'SQLite3'] |
| 30 | + mysql-versions: ['5.7'] |
| 31 | + dependencies: ['highest'] |
31 | 32 | include: |
| 33 | + # MySQL 8.0 |
32 | 34 | - php-versions: '7.4' |
33 | 35 | db-platforms: MySQLi |
34 | 36 | mysql-versions: '8.0' |
| 37 | + dependencies: 'highest' |
| 38 | + # Lowest Dependency |
| 39 | + - php-versions: '7.4' |
| 40 | + db-platforms: MySQLi |
| 41 | + mysql-versions: '5.7' |
| 42 | + dependencies: 'lowest' |
| 43 | + # Postgre |
| 44 | + - php-versions: '7.4' |
| 45 | + db-platforms: Postgre |
| 46 | + mysql-versions: '5.7' |
| 47 | + dependencies: 'highest' |
| 48 | + # SQLSRV |
| 49 | + - php-versions: '7.4' |
| 50 | + db-platforms: SQLSRV |
| 51 | + mysql-versions: '5.7' |
| 52 | + dependencies: 'highest' |
| 53 | + # OCI8 |
| 54 | + - php-versions: '7.4' |
| 55 | + db-platforms: OCI8 |
| 56 | + mysql-versions: '5.7' |
| 57 | + dependencies: 'highest' |
35 | 58 |
|
36 | 59 | services: |
37 | 60 | mysql: |
@@ -109,26 +132,27 @@ jobs: |
109 | 132 | extensions: intl, json, mbstring, gd, xdebug, xml, sqlite3, sqlsrv, oci8, pgsql |
110 | 133 | coverage: xdebug |
111 | 134 | env: |
112 | | - COMPOSER_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
| 135 | + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
113 | 136 |
|
114 | 137 | - name: Get composer cache directory |
115 | | - id: composer-cache |
116 | | - run: echo "::set-output name=dir::$(composer config cache-files-dir)" |
| 138 | + run: echo "COMPOSER_CACHE_FILES_DIR=$(composer config cache-files-dir)" >> $GITHUB_ENV |
117 | 139 |
|
118 | 140 | - name: Cache composer dependencies |
119 | 141 | uses: actions/cache@v3 |
120 | 142 | with: |
121 | | - path: ${{ steps.composer-cache.outputs.dir }} |
| 143 | + path: ${{ env.COMPOSER_CACHE_FILES_DIR }} |
122 | 144 | key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }}-${{ hashFiles('**/composer.lock') }} |
123 | 145 | restore-keys: ${{ runner.os }}-composer- |
124 | 146 |
|
125 | 147 | - name: Install dependencies |
126 | 148 | run: | |
127 | 149 | if [ -f composer.lock ]; then |
128 | | - composer install --no-progress --no-interaction --prefer-dist --optimize-autoloader |
| 150 | + composer install ${{ env.COMPOSER_UPDATE_FLAGS }} --no-progress --no-interaction --prefer-dist --optimize-autoloader |
129 | 151 | else |
130 | | - composer update --no-progress --no-interaction --prefer-dist --optimize-autoloader |
| 152 | + composer update ${{ env.COMPOSER_UPDATE_FLAGS }} --no-progress --no-interaction --prefer-dist --optimize-autoloader |
131 | 153 | fi |
| 154 | + env: |
| 155 | + COMPOSER_UPDATE_FLAGS: ${{ matrix.dependencies == 'lowest' && '--prefer-lowest' || '' }} |
132 | 156 |
|
133 | 157 | - name: Test with PHPUnit |
134 | 158 | run: vendor/bin/phpunit --verbose --coverage-text --testsuite main |
|
0 commit comments