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
49 changes: 41 additions & 8 deletions .github/workflows/laravel.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,53 @@ name: Laravel

on:
push:
branches: [ master ]
branches: [ master, main ]
pull_request:
branches: [ master ]
branches: [ master, main ]

jobs:
laravel-tests:

runs-on: ubuntu-latest

strategy:
matrix:
php-version: ['8.2', '8.3']
laravel-version: ['8.*', '9.*', '10.*', '11.*']
include:
- laravel-version: '8.*'
testbench-version: '^6.0'
- laravel-version: '9.*'
testbench-version: '^7.0'
- laravel-version: '10.*'
testbench-version: '^8.0'
- laravel-version: '11.*'
testbench-version: '^9.0'

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

steps:
- uses: actions/checkout@v2
- name: Copy .env
run: php -r "file_exists('.env') || copy('.env.example', '.env');"
- name: Install Dependencies
run: composer install -q --no-ansi --no-interaction --no-scripts --no-suggest --no-progress --prefer-dist
- uses: actions/checkout@v4

- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-version }}
extensions: dom, curl, libxml, mbstring, zip, pcntl, pdo, sqlite, pdo_sqlite, bcmath, soap, intl, gd, exif, iconv
coverage: none

- name: Cache Composer packages
id: composer-cache
uses: actions/cache@v3
with:
path: vendor
key: ${{ runner.os }}-php-${{ matrix.php-version }}-${{ hashFiles('**/composer.lock') }}
restore-keys: |
${{ runner.os }}-php-${{ matrix.php-version }}-

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

- name: Execute tests (Unit and Feature tests) via PHPUnit
run: vendor/bin/phpunit
10 changes: 5 additions & 5 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,14 @@
}
],
"require": {
"php": "^8.0",
"illuminate/support": "^8.0|^9.0|^10.0",
"php": "^8.2",
"illuminate/support": "^8.0|^9.0|^10.0|^11.0",
"spatie/laravel-webhook-client": "^3.0",
"twilio/sdk": "^6.37|^7.0"
"twilio/sdk": "^6.37|^7.0|^8.0"
},
"require-dev": {
"orchestra/testbench": "^6.0|^7.0|^8.0",
"phpunit/phpunit": "^9.4|^10.0"
"orchestra/testbench": "^6.0|^7.0|^8.0|^9.0",
"phpunit/phpunit": "^9.4|^10.0|^11.0"
},
"autoload": {
"psr-4": {
Expand Down
6 changes: 3 additions & 3 deletions tests/TestCase.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
namespace Tests;

use BinaryCats\TwilioWebhooks\TwilioWebhooksServiceProvider;
use Exception;
use Throwable;
use Illuminate\Contracts\Debug\ExceptionHandler;
use Illuminate\Foundation\Exceptions\Handler;
use Orchestra\Testbench\TestCase as OrchestraTestCase;
Expand Down Expand Up @@ -68,8 +68,8 @@ protected function disableExceptionHandling()
$this->app->instance(ExceptionHandler::class, new class extends Handler
{
public function __construct(){}
public function report(Exception $e){}
public function render($request, Exception $exception){throw $exception;}
public function report(Throwable $e){}
public function render($request, Throwable $exception){throw $exception;}
});
}
}