From 8b947e8ccd8541627012eedc25d943415bedf6fe Mon Sep 17 00:00:00 2001 From: Jacob Baker-Kretzmar Date: Wed, 20 Mar 2024 14:58:51 -0400 Subject: [PATCH] Uninstall Folio and skip tests on Laravel <10 --- .github/workflows/test.yml | 2 ++ tests/Unit/ZiggyTest.php | 4 ++++ 2 files changed, 6 insertions(+) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index ec8b900a..be013226 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -34,6 +34,8 @@ jobs: with: node-version: 20 cache: 'npm' + - run: composer remove laravel/folio --dev --no-update --no-interaction + if: matrix.laravel == 9 - run: composer require laravel/framework:"${{ matrix.laravel }}.*" --no-update --no-interaction - uses: ramsey/composer-install@v2 with: diff --git a/tests/Unit/ZiggyTest.php b/tests/Unit/ZiggyTest.php index 597ff4c9..edd05dd0 100644 --- a/tests/Unit/ZiggyTest.php +++ b/tests/Unit/ZiggyTest.php @@ -11,6 +11,10 @@ protected function setUp(): void { parent::setUp(); + if ((int) head(explode('.', app()->version())) < 10) { + $this->markTestSkipped('Folio requires Laravel >=10'); + } + $router = app('router'); $router->get('home', $this->noop())->name('home');