Skip to content

latest dev deps

latest dev deps #14

Workflow file for this run

name: Tests
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
test:
runs-on: ubuntu-latest
strategy:
fail-fast: true
matrix:
php: [ 8.3 ]
laravel: [ 11.*, 12.* ]
stability: [ prefer-lowest, prefer-stable ]
include:
- laravel: 11.*
testbench: ^9.0.0
- laravel: 12.*
testbench: ^10.0.0
name: P${{ matrix.php }} - L${{ matrix.laravel }} - ${{ matrix.stability }}
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
extensions: dom, curl, libxml, mbstring, zip, pcntl, pdo, sqlite, pdo_sqlite, bcmath, soap, intl, gd, exif, iconv, imagick
coverage: none
- name: Setup problem matchers
run: |
echo "::add-matcher::${{ runner.tool_cache }}/php.json"
echo "::add-matcher::${{ runner.tool_cache }}/phpunit.json"
- name: Install dependencies (latest dev)
run: |
# Pin the Laravel/Testbench versions into the solver (no update yet)
composer require "laravel/framework:${{ matrix.laravel }}" "orchestra/testbench:${{ matrix.testbench }}" --no-interaction --no-update
# 1) Resolve runtime (non-dev) at matrix stability and write the lock
composer update --${{ matrix.stability }} --prefer-dist --no-interaction --no-dev --no-scripts
# 2) Update ONLY direct dev packages to latest allowed (this populates packages-dev in the lock)
DEV_PKGS=$(composer show --direct --dev --name-only)
if [ -n "$DEV_PKGS" ]; then
composer update $DEV_PKGS --with-all-dependencies --prefer-dist --no-interaction --no-scripts
fi
# 3) Install exactly what's in the lock (now includes dev)
composer install --prefer-dist --no-interaction --no-scripts
- name: List Installed Dependencies
run: composer show -D
- name: Execute tests
run: ./vendor/bin/pest --ci