Github Action Test Failing with brand logo on

ViewException
View [software.settings.logo] not found. (View: /home/runner/work/myapp/myapp/vendor/filament/filament/resources/views/components/logo.blade.php) (View: /home/runner/work/myapp/myapp/vendor/filament/filament/resources/views/components/logo.blade.php) this is the error im getting in github , all my test pass if in my local enviroment and when i remove this line in my panel all test passes in github action
->brandLogo(fn () => view('software.settings.logo'))
->brandLogo(fn () => view('software.settings.logo'))
the view is there cause its working please help
3 Replies
KingStalker
KingStalker3w ago
name: Testing
on: [push, pull_request]
jobs:
tests:
name: Test Application
runs-on: ubuntu-latest
services:
mysql:
image: mysql:8.0
env:
MYSQL_ALLOW_EMPTY_PASSWORD: true
MYSQL_ROOT_PASSWORD:
MYSQL_DATABASE: test
ports:
- 3306:3306
options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3
strategy:
fail-fast: false
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup PHP, with composer and extensions
uses: shivammathur/setup-php@v2
with:
php-version: 8.3
extensions: mbstring, dom, fileinfo, pdo, mysql
- name: Get composer cache directory
id: composer-cache
run: echo "::set-output name=dir::$(composer config cache-files-dir)"
- name: Cache composer dependencies
uses: actions/cache@v2
with:
path: ${{ steps.composer-cache.outputs.dir }}
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
restore-keys: ${{ runner.os }}-composer-
- name: Install Composer dependencies
run: composer install -n --prefer-dist
- name: Prepare the application
run: |
php -r "file_exists('.env') || copy('.env.testing', '.env');"
- name: clear config
run: php artisan config:clear
- name: clear views
run: php artisan view:clear
- name: Run Migration
run: php artisan migrate -v
- name: Test with phpunit
run: php artisan test
name: Testing
on: [push, pull_request]
jobs:
tests:
name: Test Application
runs-on: ubuntu-latest
services:
mysql:
image: mysql:8.0
env:
MYSQL_ALLOW_EMPTY_PASSWORD: true
MYSQL_ROOT_PASSWORD:
MYSQL_DATABASE: test
ports:
- 3306:3306
options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3
strategy:
fail-fast: false
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup PHP, with composer and extensions
uses: shivammathur/setup-php@v2
with:
php-version: 8.3
extensions: mbstring, dom, fileinfo, pdo, mysql
- name: Get composer cache directory
id: composer-cache
run: echo "::set-output name=dir::$(composer config cache-files-dir)"
- name: Cache composer dependencies
uses: actions/cache@v2
with:
path: ${{ steps.composer-cache.outputs.dir }}
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
restore-keys: ${{ runner.os }}-composer-
- name: Install Composer dependencies
run: composer install -n --prefer-dist
- name: Prepare the application
run: |
php -r "file_exists('.env') || copy('.env.testing', '.env');"
- name: clear config
run: php artisan config:clear
- name: clear views
run: php artisan view:clear
- name: Run Migration
run: php artisan migrate -v
- name: Test with phpunit
run: php artisan test
.env.testing ```env APP_NAME="myapp" APP_ENV=testing APP_KEY=base64:iSgW1vFSRF9ieXJpLps9+IvET2U8vcG7iw0NLE2yRvM= APP_DEBUG=true APP_URL=http://localhost DB_CONNECTION=mysql DB_HOST=127.0.0.1 DB_PORT=3306 DB_DATABASE=test DB_USERNAME=root DB_PASSWORD=
LeandroFerreira
weird.. maybe you could ignore this view in the test
->brandLogo(fn() => app()->runningUnitTests() ? null : view('software.settings.logo'))
->brandLogo(fn() => app()->runningUnitTests() ? null : view('software.settings.logo'))
KingStalker
KingStalker3w ago
Tests: 32 passed (176 assertions) Duration: 12.02s you are a lifesaver thank you