Skip to content
Open
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
15 changes: 12 additions & 3 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,28 +2,35 @@ name: run-tests

on:
push:
branches: [main]
branches:
- main
pull_request:
branches: [main]
branches:
- main

jobs:
test:
runs-on: ${{ matrix.os }}

strategy:
fail-fast: false
matrix:
os: [ubuntu-latest]
php: [8.2]
laravel: [11.*]
laravel: ['11.*', '12.*']
stability: [prefer-stable]
include:
- laravel: 11.*
testbench: ^9.0
- laravel: 12.*
testbench: ^10.0

env:
DB_CONNECTION: testing
DB_DATABASE: laravel
DB_USERNAME: root
DB_PASSWORD: TestDB@1234

services:
mysql:
image: mysql:latest
Expand Down Expand Up @@ -52,10 +59,12 @@ jobs:
run: |
echo "::add-matcher::${{ runner.tool_cache }}/php.json"
echo "::add-matcher::${{ runner.tool_cache }}/phpunit.json"

- name: Install dependencies
run: |
composer require "laravel/framework:${{ matrix.laravel }}" "orchestra/testbench:${{ matrix.testbench }}" --no-interaction --no-update
composer update --${{ matrix.stability }} --prefer-dist --no-interaction

- name: Execute tests
run: vendor/bin/phpunit
env:
Expand Down
6 changes: 3 additions & 3 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,11 @@
],
"require": {
"php": ">=8.2.0",
"illuminate/support": "^11.0"
"illuminate/support": "^11.0|^12.0"
},
"require-dev": {
"nunomaduro/larastan": "^2.0",
"orchestra/testbench": "^9.0",
"orchestra/testbench": "^9.0|^10.0",
"phpunit/phpunit": "^11.0"
},
"autoload": {
Expand Down Expand Up @@ -53,4 +53,4 @@
}
}
}
}
}
Loading