Skip to content

Commit 2d318b3

Browse files
authored
Merge pull request #15744 from marcusmoore/chore/action-tests-debugging
Added the display of logs when tests fail in GitHub Actions
2 parents 86d784b + 5c49716 commit 2d318b3

File tree

3 files changed

+12
-0
lines changed

3 files changed

+12
-0
lines changed

.github/workflows/tests-mysql.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,3 +77,7 @@ jobs:
7777
DB_PORT: ${{ job.services.mysql.ports[3306] }}
7878
DB_USERNAME: root
7979
run: php artisan test
80+
81+
- name: Test failure
82+
if: ${{ failure() }}
83+
run: docker exec "$PROJECT_NAME-php-fpm" cat storage/logs/laravel.log

.github/workflows/tests-postgres.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,3 +75,7 @@ jobs:
7575
DB_USERNAME: snipeit
7676
DB_PASSWORD: password
7777
run: php artisan test
78+
79+
- name: Test failure
80+
if: ${{ failure() }}
81+
run: docker exec "$PROJECT_NAME-php-fpm" cat storage/logs/laravel.log

.github/workflows/tests-sqlite.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,3 +59,7 @@ jobs:
5959
env:
6060
DB_CONNECTION: sqlite_testing
6161
run: php artisan test
62+
63+
- name: Test failure
64+
if: ${{ failure() }}
65+
run: docker exec "$PROJECT_NAME-php-fpm" cat storage/logs/laravel.log

0 commit comments

Comments
 (0)