Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 21 additions & 13 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,11 @@ jobs:
strategy:
matrix:
php-versions: ['8.2', '8.3', '8.4']
laravel-versions: ['11.0', '12.0']
laravel-versions: ['12.0', '13.0']
exclude:
# Laravel 13 requires PHP 8.3 or newer.
- php-versions: '8.2'
laravel-versions: '13.0'

name: PHP ${{ matrix.php-versions }} - Laravel ${{ matrix.laravel-versions }}

Expand All @@ -31,22 +35,26 @@ jobs:
id: composer-cache
run: echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT

- name: Cache composer dependencies
# Keyed on the matrix cell as well as composer.json: without a lock file
# every cell would otherwise share one key and restore another cell's
# dependencies. The vendor directory itself is deliberately not cached for
# the same reason.
- name: Cache composer downloads
uses: actions/cache@v4
with:
path: ${{ steps.composer-cache.outputs.dir }}
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
restore-keys: ${{ runner.os }}-composer-

- name: Cache vendor directory
uses: actions/cache@v4
with:
path: vendor
key: ${{ runner.os }}-vendor-${{ hashFiles('**/composer.lock') }}
restore-keys: ${{ runner.os }}-vendor-
key: ${{ runner.os }}-composer-php${{ matrix.php-versions }}-laravel${{ matrix.laravel-versions }}-${{ hashFiles('composer.json') }}
restore-keys: ${{ runner.os }}-composer-php${{ matrix.php-versions }}-laravel${{ matrix.laravel-versions }}-

# Resolve against the matrix rather than a lock file, so the Laravel version
# in the job name is the one actually installed.
- name: Install Composer dependencies
run: composer install --no-progress --prefer-dist --optimize-autoloader
run: |
composer require "laravel/framework:^${{ matrix.laravel-versions }}" --no-interaction --no-update
composer update --no-progress --prefer-dist --prefer-stable --optimize-autoloader

- name: Show installed versions
run: composer show --direct

- name: Check Pest binary
run: ls -la ./vendor/bin/pest && ./vendor/bin/pest --version
Expand All @@ -58,4 +66,4 @@ jobs:
run: ./vendor/bin/pint --test

- name: Run PHPStan
run: ./vendor/bin/phpstan analyse --no-progress --memory-limit=256M
run: ./vendor/bin/phpstan analyse --no-progress --memory-limit=1G
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,8 @@
/.phpunit.result.cache
/composer.phar
/auth.json

# A library resolves against the consuming application, so the lock is not
# committed: pinning it here made CI install one set of dependencies for every
# cell of the Laravel matrix.
/composer.lock
14 changes: 7 additions & 7 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,16 +21,16 @@
}
],
"require": {
"php": "^8.2|^8.3|^8.4",
"laravel/framework": "^11.0|^12.0"
"php": "^8.2|^8.3|^8.4|^8.5",
"laravel/framework": "^13.0"
},
"require-dev": {
"larastan/larastan": "^2.11",
"larastan/larastan": "^2.11|^3.0",
"laravel/pint": "^1.0",
"orchestra/testbench": "^9.0",
"pestphp/pest": "^2.0",
"pestphp/pest-plugin-laravel": "^2.0",
"phpstan/phpstan": "^1.10"
"orchestra/testbench": "^10.0|^11.0",
"pestphp/pest": "^2.0|^3.0|^4.0",
"pestphp/pest-plugin-laravel": "^2.0|^3.0|^4.0",
"phpstan/phpstan": "^1.10|^2.0"
},
"scripts": {
"test": "pest",
Expand Down
Loading
Loading