#Encountering "Auth driver [sanctum] for guard [sanctum] is not defined." in CI Pipeline

1 messages · Page 1 of 1 (latest)

sturdy tide
#

it does look like a cache problem. So from what I can tell it only happens in your gitlab actions, in the pipeline? And you're running cache:clear and it still happens?

#

Just for reference this is all the "clearing" we do in our deployment pipeline, maybe test some of those?

php artisan clear-compiled
php artisan optimize
php artisan config:cache
php artisan cache:clear
sturdy tide
#

Got it. And I assume that all tests work fine when running locally?

fossil stump
#

Where are you enabling the stateful API middleware

raven silo
#

I mean, I would probably separate out your jobs a bit into different workflows

#

Running PHPStan, then Rector, then Pest-Test, then Dusk-Tests seems a bit daft

#

Given that you're checking out the code each time, installing the requiremetns, preparing the dependencies, installing npm etc

#

most of which are not needed for most of your workflow actions

#

Split them out, and they'll run in parallel, will be much faster to complete etc

#

Your PHPUnit job for example, does not need NPM

#

As for sanctum, I can't see it in your composer.json