diff --git a/.github/workflows/e2e.yml b/.github/workflows/e2e.yml index 08e4fe17..7d7f21be 100644 --- a/.github/workflows/e2e.yml +++ b/.github/workflows/e2e.yml @@ -21,7 +21,7 @@ jobs: - name: Set up PHP uses: shivammathur/setup-php@v2 with: - php-version: 7.4 + php-version: 8.1 tools: composer:v2 extensions: pdo_sqlite - name: Install PHP dependencies diff --git a/tests/Traits/CreatesApplication.php b/tests/Traits/CreatesApplication.php index e219e2ab..01bba4a9 100644 --- a/tests/Traits/CreatesApplication.php +++ b/tests/Traits/CreatesApplication.php @@ -6,6 +6,7 @@ use App\Console\Kernel; use App\Models\User; use Illuminate\Contracts\Console\Kernel as Artisan; use Illuminate\Foundation\Application; +use Throwable; trait CreatesApplication { @@ -28,7 +29,12 @@ trait CreatesApplication private function prepareForTests(): void { - $this->artisan->call('migrate'); + try { + $this->artisan->call('migrate'); + } catch (Throwable $e) { + \Log::error($e); // @phpcs:ignore + throw $e; + } if (!User::count()) { $this->artisan->call('db:seed');