Skip to content

Commit

Permalink
Bootstrap application before running tests
Browse files Browse the repository at this point in the history
  • Loading branch information
jschram committed Dec 16, 2024
1 parent d2b0233 commit 6bec34c
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .github/workflows/continuous-integration.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ jobs:
run: ./buildHook.sh $PWD

- name: Run Test & Coverage Report
run: ./vendor/bin/phpunit --coverage-clover ./coverage.xml
run: composer test-coverage-xml
env:
DB_HOST: localhost
DB_DATABASE: tests_db
Expand Down
7 changes: 7 additions & 0 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -87,8 +87,15 @@
"@php artisan test --parallel"
],
"test-coverage": [
"php artisan migrate --env=testing --no-ansi",
"php artisan bootstrap:application --env=testing --no-ansi",
"./vendor/bin/phpunit --coverage-html public/tests-report"
],
"test-coverage-xml": [
"php artisan migrate --env=testing --no-ansi",
"php artisan bootstrap:application --env=testing --no-ansi",
"./vendor/bin/phpunit --coverage-clover ./coverage.xml"
],
"test-fresh": [
"php artisan migrate:fresh --env=testing --no-ansi",
"php artisan bootstrap:application --env=testing --no-ansi",
Expand Down

0 comments on commit 6bec34c

Please sign in to comment.