Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions .github/workflows/laravel-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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:
Expand Down