bezhanSalleh / filament-shield

The easiest and most intuitive way to add access management to your Filament Admin Resources, Pages & Widgets through `spatie/laravel-permission`
MIT License
1.35k stars 166 forks source link

When using github action to test, the project trait HasPanelShield try to assign role to user in step of php artisan key:generate #378

Closed soap closed 2 months ago

soap commented 2 months ago

The problem is ServiceProvider was called during key:generate command, the trait try to assign role if panel_user role was enabled. But the migration was not run yet. So it failed the test.

If I diasble panel_user role before php artisan key:generate it is ok. But I have to enable it before testing using ENV variable. image

Any suggestion for this issue? Thanks in advance.

bezhanSalleh commented 2 months ago

hmm.. can you change the order of tests? other than this don't know much about testing apologies.