diff --git a/.github/workflows/laravel-tests.yml b/.github/workflows/laravel-tests.yml index 4eea6e0..541d83f 100644 --- a/.github/workflows/laravel-tests.yml +++ b/.github/workflows/laravel-tests.yml @@ -19,6 +19,10 @@ on: test_command: type: string default: "vendor/bin/phpunit" + setup_command: + description: "Extra shell command to run after the environment is prepared (DB, keys, permissions) but before tests run. Useful for app-specific setup like `php artisan passport:keys --force`." + type: string + default: "" environment: description: "GitHub environment name for environment-scoped variables/secrets. Leave empty to avoid registering a deployment." type: string @@ -84,6 +88,10 @@ jobs: mkdir -p database touch database/database.sqlite + - name: Run setup command + if: inputs.setup_command != '' + run: ${{ inputs.setup_command }} + - name: Run tests env: DB_CONNECTION: sqlite @@ -162,6 +170,10 @@ jobs: mkdir -p database touch database/database.sqlite + - name: Run setup command + if: inputs.setup_command != '' + run: ${{ inputs.setup_command }} + - name: Run migrations run: php artisan migrate --env=testing --force env: