@@ -187,3 +187,97 @@ jobs:
187187 github-token : ${{ secrets.GITHUB_TOKEN }}
188188 parallel-finished : true
189189 if : ${{ steps.coveralls-check.outputs.execute == 'true' }}
190+
191+ compatibility :
192+ runs-on : ubuntu-latest
193+
194+ strategy :
195+ matrix :
196+ include :
197+ - php-version : 8.3
198+ laravel-version : ^11.0
199+ testbench-version : ^9.0
200+ - php-version : 8.3
201+ laravel-version : ^12.0
202+ testbench-version : ^10.0
203+ - php-version : 8.3
204+ laravel-version : ^13.0
205+ testbench-version : ^11.0
206+
207+ services :
208+ redis :
209+ image : redis:7-alpine
210+ options : >-
211+ --health-cmd "redis-cli ping"
212+ --health-interval 5s
213+ --health-timeout 3s
214+ --health-retries 5
215+ ports :
216+ - 6379:6379
217+
218+ steps :
219+ - name : Checkout
220+ uses : actions/checkout@v6
221+
222+ - name : Setup cache environment
223+ id : extcache-compatibility
224+ uses : shivammathur/cache-extensions@v1
225+ with :
226+ php-version : ${{ matrix.php-version }}
227+ extensions : mbstring, sqlite, redis, bcmath
228+ key : ${{ runner.os }}-compatibility-php-extensions-${{ matrix.php-version }}-${{ hashFiles('**/composer.lock') }}
229+
230+ - name : Cache extensions
231+ uses : actions/cache@v4
232+ with :
233+ path : ${{ steps.extcache-compatibility.outputs.dir }}
234+ key : ${{ steps.extcache-compatibility.outputs.key }}
235+ restore-keys : ${{ steps.extcache-compatibility.outputs.key }}
236+
237+ - name : Setup PHP
238+ uses : shivammathur/setup-php@v2
239+ with :
240+ php-version : ${{ matrix.php-version }}
241+ extensions : mbstring, sqlite, redis, bcmath
242+ coverage : pcov
243+ env :
244+ runner : self-hosted
245+
246+ - name : Validate composer.json and composer.lock
247+ run : composer validate --strict
248+
249+ - name : Get Composer cache directory
250+ id : composer-cache-dir-compatibility
251+ run : echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT
252+
253+ - name : Cache Composer packages
254+ uses : actions/cache@v4
255+ with :
256+ path : vendor
257+ key : ${{ runner.os }}-compatibility-${{ matrix.php-version }}-${{ matrix.laravel-version }}-${{ hashFiles('**/composer.lock') }}
258+ restore-keys : |
259+ ${{ runner.os }}-compatibility-${{ matrix.php-version }}-
260+
261+ - name : Cache Composer cache
262+ uses : actions/cache@v4
263+ with :
264+ path : ${{ steps.composer-cache-dir-compatibility.outputs.dir }}
265+ key : ${{ runner.os }}-composer-cache-compatibility-${{ matrix.php-version }}-${{ matrix.laravel-version }}-${{ hashFiles('**/composer.lock') }}
266+ restore-keys : |
267+ ${{ runner.os }}-composer-cache-compatibility-${{ matrix.php-version }}-
268+
269+ - name : Install dependencies for compatibility matrix
270+ run : >-
271+ composer update
272+ --prefer-dist
273+ --no-progress
274+ --with "illuminate/contracts:${{ matrix.laravel-version }}"
275+ --with "illuminate/database:${{ matrix.laravel-version }}"
276+ --with "orchestra/testbench:${{ matrix.testbench-version }}"
277+
278+ - name : Run compatibility test suite
279+ run : composer parabench
280+ env :
281+ DB_CONNECTION : testing
282+ WALLET_CACHE_DRIVER : array
283+ WALLET_LOCK_DRIVER : redis
0 commit comments