From 5c49716129950b19b503c0d05456ea83c2119755 Mon Sep 17 00:00:00 2001 From: Marcus Moore Date: Mon, 28 Oct 2024 10:24:35 -0700 Subject: [PATCH] Dump logs on test failure --- .github/workflows/tests-mysql.yml | 4 ++++ .github/workflows/tests-postgres.yml | 4 ++++ .github/workflows/tests-sqlite.yml | 4 ++++ 3 files changed, 12 insertions(+) diff --git a/.github/workflows/tests-mysql.yml b/.github/workflows/tests-mysql.yml index 310414cda6..63fcb8e3e2 100644 --- a/.github/workflows/tests-mysql.yml +++ b/.github/workflows/tests-mysql.yml @@ -77,3 +77,7 @@ jobs: DB_PORT: ${{ job.services.mysql.ports[3306] }} DB_USERNAME: root run: php artisan test + + - name: Test failure + if: ${{ failure() }} + run: docker exec "$PROJECT_NAME-php-fpm" cat storage/logs/laravel.log diff --git a/.github/workflows/tests-postgres.yml b/.github/workflows/tests-postgres.yml index ae48277be3..3cc5244c5e 100644 --- a/.github/workflows/tests-postgres.yml +++ b/.github/workflows/tests-postgres.yml @@ -75,3 +75,7 @@ jobs: DB_USERNAME: snipeit DB_PASSWORD: password run: php artisan test + + - name: Test failure + if: ${{ failure() }} + run: docker exec "$PROJECT_NAME-php-fpm" cat storage/logs/laravel.log diff --git a/.github/workflows/tests-sqlite.yml b/.github/workflows/tests-sqlite.yml index 8bf0115169..011d19d783 100644 --- a/.github/workflows/tests-sqlite.yml +++ b/.github/workflows/tests-sqlite.yml @@ -59,3 +59,7 @@ jobs: env: DB_CONNECTION: sqlite_testing run: php artisan test + + - name: Test failure + if: ${{ failure() }} + run: docker exec "$PROJECT_NAME-php-fpm" cat storage/logs/laravel.log