From 11f147ac8b9c646860273bad1035cc63d6cbbf01 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andrei=20Ioni=C8=9B=C4=83?= Date: Thu, 6 Jun 2024 12:30:35 +0100 Subject: [PATCH 1/3] test: upload log as artefact --- .github/workflows/tests.yml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index acc7a9b..65cc42c 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -11,7 +11,7 @@ jobs: fail-fast: false matrix: php-version: - - "8.2" + - '8.2' env: extensions: mbstring, sqlite, intl, gd @@ -64,3 +64,9 @@ jobs: - name: Run tests run: php artisan test + + - name: Upload logs + uses: actions/upload-artifact@v4 + with: + name: php-${{ matrix.php-version }}-logs + path: storage/logs/laravel.log From c477b51c7b607c37f35510e07aeabcc25ed5f9f9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andrei=20Ioni=C8=9B=C4=83?= Date: Thu, 6 Jun 2024 12:32:48 +0100 Subject: [PATCH 2/3] always run --- .github/workflows/tests.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 65cc42c..c1a91d1 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -66,6 +66,7 @@ jobs: run: php artisan test - name: Upload logs + if: always() uses: actions/upload-artifact@v4 with: name: php-${{ matrix.php-version }}-logs From dbd4f26bd2fdcac18873c49ba12621bdf848cff7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andrei=20Ioni=C8=9B=C4=83?= Date: Thu, 6 Jun 2024 12:42:43 +0100 Subject: [PATCH 3/3] fix db --- tests/TestCase.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tests/TestCase.php b/tests/TestCase.php index 43769c7..b8fcbe5 100644 --- a/tests/TestCase.php +++ b/tests/TestCase.php @@ -4,10 +4,13 @@ namespace Tests; +use Illuminate\Foundation\Testing\RefreshDatabase; use Illuminate\Foundation\Testing\TestCase as BaseTestCase; abstract class TestCase extends BaseTestCase { + use RefreshDatabase; + protected function setUp(): void { parent::setUp();