Skip to content
Closed
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
175 changes: 94 additions & 81 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -1,91 +1,104 @@
name: tests

on: [push, pull_request]
on:
- push
- pull_request

jobs:
test:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest]
php: [8.3, 8.2, 8.1, 8.0, 7.4, 7.3]
laravel: [6.*, 7.*, 8.*, 9.*, 10.*, 11.*]
dependency-version: [prefer-lowest, prefer-stable]
include:
- laravel: 11.*
testbench: 9.*
- laravel: 10.*
testbench: 8.*
- laravel: 9.*
testbench: 7.*
- laravel: 8.*
testbench: ^6.24
- laravel: 7.*
testbench: ^5.20
- laravel: 6.*
testbench: ^4.17
exclude:
- laravel: 11.*
php: 8.1
- laravel: 11.*
php: 8.0
- laravel: 11.*
php: 7.4
- laravel: 11.*
php: 7.3
- laravel: 10.*
php: 8.0
- laravel: 10.*
php: 7.4
- laravel: 10.*
php: 7.3
- laravel: 9.*
php: 7.3
- laravel: 9.*
php: 7.4
- laravel: 8.*
php: 8.2
dependency-version: prefer-lowest
- laravel: 8.*
php: 8.3
dependency-version: prefer-lowest
- laravel: 7.*
php: 8.1
- laravel: 7.*
php: 8.2
- laravel: 7.*
php: 8.3
- laravel: 6.*
php: 8.1
- laravel: 6.*
php: 8.2
- laravel: 6.*
php: 8.3
test:
runs-on: ${{ matrix.os }}

name: P${{ matrix.php }} - L${{ matrix.laravel }} - ${{ matrix.dependency-version }} - ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest]
php: [8.3, 8.2, 8.1, 8.0, 7.4, 7.3]
laravel: ['6.*', '7.*', '8.*', '9.*', '10.*', '11.*', '12.*']
dependency-version: [prefer-lowest, prefer-stable]
include:
- laravel: 11.*
testbench: 9.*
- laravel: 10.*
testbench: 8.*
- laravel: 9.*
testbench: 7.*
- laravel: 8.*
testbench: ^6.24
- laravel: 7.*
testbench: ^5.20
- laravel: 6.*
testbench: ^4.17
- laravel: 12.*
testbench: 10.*
exclude:
- laravel: 11.*
php: 8.1
- laravel: 11.*
php: 8.0
- laravel: 11.*
php: 7.4
- laravel: 11.*
php: 7.3
- laravel: 10.*
php: 8.0
- laravel: 10.*
php: 7.4
- laravel: 10.*
php: 7.3
- laravel: 9.*
php: 7.3
- laravel: 9.*
php: 7.4
- laravel: 8.*
php: 8.2
dependency-version: prefer-lowest
- laravel: 8.*
php: 8.3
dependency-version: prefer-lowest
- laravel: 7.*
php: 8.1
- laravel: 7.*
php: 8.2
- laravel: 7.*
php: 8.3
- laravel: 6.*
php: 8.1
- laravel: 6.*
php: 8.2
- laravel: 6.*
php: 8.3
- laravel: 12.*
php: 8.1
- laravel: 12.*
php: 8.0
- laravel: 12.*
php: 7.4
- laravel: 12.*
php: 7.3

steps:
- name: Checkout code
uses: actions/checkout@v2
name: P${{ matrix.php }} - L${{ matrix.laravel }} - ${{ matrix.dependency-version }} - ${{ matrix.os }}

- name: Cache dependencies
uses: actions/cache@v1
with:
path: ~/.composer/cache/files
key: dependencies-laravel-${{ matrix.laravel }}-php-${{ matrix.php }}-composer-${{ hashFiles('composer.json') }}
steps:
- name: Checkout code
uses: actions/checkout@v2

- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
extensions: dom, curl, libxml, mbstring, zip, pcntl, bcmath, intl, iconv
coverage: none
- name: Cache dependencies
uses: actions/cache@v1
with:
path: ~/.composer/cache/files
key: dependencies-laravel-${{ matrix.laravel }}-php-${{ matrix.php }}-composer-${{ hashFiles('composer.json') }}

- name: Install dependencies
run: |
composer require "laravel/framework:${{ matrix.laravel }}" "orchestra/testbench:${{ matrix.testbench }}" --no-interaction --no-update
composer update --${{ matrix.dependency-version }} --prefer-dist --no-interaction --no-suggest
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
extensions: dom, curl, libxml, mbstring, zip, pcntl, bcmath, intl, iconv
coverage: none

- name: Execute tests
run: vendor/bin/phpunit
- name: Install dependencies
run: |
composer require "laravel/framework:${{ matrix.laravel }}" "orchestra/testbench:${{ matrix.testbench }}" --no-interaction --no-update
composer update --${{ matrix.dependency-version }} --prefer-dist --no-interaction --no-suggest

- name: Execute tests
run: vendor/bin/phpunit
4 changes: 2 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
],
"require": {
"php": "^7.3 || ^7.4 || ^8.0 || ^8.1 || ^8.2 || ^8.3",
"illuminate/support": "^6.0 || ^7.0 || ^8.0 || ^9.0 || ^10.0 || ^11.0",
"illuminate/support": "^6.0 || ^7.0 || ^8.0 || ^9.0 || ^10.0 || ^11.0 || ^12.0",
"ext-json": "*"
},
"autoload": {
Expand Down Expand Up @@ -54,7 +54,7 @@
},
"require-dev": {
"friendsofphp/php-cs-fixer": "^2 || ^3",
"orchestra/testbench": "^4.0 || ^5.0 || ^6.0 || ^7.0 || ^8.0 || ^9.0",
"orchestra/testbench": "^4.0 || ^5.0 || ^6.0 || ^7.0 || ^8.0 || ^9.0 || ^10.0",
"phpunit/phpunit": "^8.0 || ^9.0 || ^10.0 || ^11.0"
}
}
Loading