From 87643110a64e6914c7ee7d4f88c74020a11497f5 Mon Sep 17 00:00:00 2001 From: Anthony Clark Date: Mon, 8 Apr 2024 20:34:37 -0700 Subject: [PATCH] Remove Nova when testing --- .github/workflows/run-tests.yml | 8 ++++---- config/app.php | 6 +++--- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/.github/workflows/run-tests.yml b/.github/workflows/run-tests.yml index d4d55fb..69004a5 100644 --- a/.github/workflows/run-tests.yml +++ b/.github/workflows/run-tests.yml @@ -31,8 +31,7 @@ jobs: - name: Install Composer Dependencies run: | - composer config "http-basic.nova.laravel.com" "${{ secrets.NOVA_USERNAME }}" "${{ secrets.NOVA_PASSWORD }}" - composer install --no-interaction + composer remove laravel/nova --no-scripts --no-interaction - name: Install Frontend Dependencies run: npm install @@ -41,7 +40,8 @@ jobs: run: npm run build - name: Generate Key - run: php artisan key:generate + run: export APP_ENV=testing && php artisan key:generate + shell: bash - name: Run PHP Tests - run: php artisan test + run: ./vendor/bin/pest diff --git a/config/app.php b/config/app.php index 3dd3459..fe85b0c 100644 --- a/config/app.php +++ b/config/app.php @@ -168,7 +168,7 @@ | */ - 'providers' => ServiceProvider::defaultProviders()->merge([ + 'providers' => ServiceProvider::defaultProviders()->merge(array_filter([ /* * Package Service Providers... */ @@ -181,9 +181,9 @@ App\Providers\AuthServiceProvider::class, // App\Providers\BroadcastServiceProvider::class, App\Providers\EventServiceProvider::class, - App\Providers\NovaServiceProvider::class, + (env('APP_ENV', 'production') != 'testing' ? App\Providers\NovaServiceProvider::class : null), App\Providers\RouteServiceProvider::class, - ])->toArray(), + ]))->toArray(), /* |--------------------------------------------------------------------------