Skip to content

Commit 3acb13f

Browse files
committed
ci: generate Passport keys before phpunit
The `api` guard is wired to the Passport driver, which boots the oauth2-server CryptKey at request resolution time. Without oauth-private.key / oauth-public.key under storage/, even tests that never touch the OAuth flow fall over with `LogicException: Invalid key supplied`. Keys are (correctly) gitignored, so CI needs to generate them itself before running the suite.
1 parent 0c8532e commit 3acb13f

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

.github/workflows/ci.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,10 @@ jobs:
5959
if: steps.precheck.outputs.skip == 'false'
6060
run: php artisan key:generate
6161

62+
- name: Passport keys
63+
if: steps.precheck.outputs.skip == 'false'
64+
run: php artisan passport:keys --force
65+
6266
- name: PHPUnit (tests)
6367
if: steps.precheck.outputs.skip == 'false'
6468
run: ./vendor/bin/phpunit

0 commit comments

Comments
 (0)