From 5b3f9393d665c0211ba1eff8bfe576894b4bbbd7 Mon Sep 17 00:00:00 2001 From: Quentin Renard Date: Mon, 14 Oct 2024 03:31:14 +0200 Subject: [PATCH 1/9] Upgrade GitHub Actions artefact upload to v4 --- .github/workflows/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index da5adcb54..bce4a038b 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -178,7 +178,7 @@ jobs: with: files: .github/clover.xml - - uses: actions/upload-artifact@v2 + - uses: actions/upload-artifact@v4 if: always() with: name: screenshots From c786d7987428558ca30f8e5b6bf13e612b7b6b5a Mon Sep 17 00:00:00 2001 From: Quentin Renard Date: Mon, 14 Oct 2024 04:06:09 +0200 Subject: [PATCH 2/9] Fix GitHub Actions upload artefact v4 usage --- .github/workflows/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index bce4a038b..7c1b1ffcc 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -181,7 +181,7 @@ jobs: - uses: actions/upload-artifact@v4 if: always() with: - name: screenshots + name: screenshots-${{ matrix.os }}-${{ matrix.php }}-${{ matrix.laravel }}-${{ matrix.dbal }} path: | tests/Browser/screenshots/ tests/Browser/console/ From 2b87139797db94206f15c6d100bae68047ed016e Mon Sep 17 00:00:00 2001 From: Quentin Renard Date: Mon, 14 Oct 2024 04:16:02 +0200 Subject: [PATCH 3/9] Fix L9 tests due to Dusk 7 not supporting Chrome > 126 --- .github/workflows/main.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 7c1b1ffcc..f2a520029 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -161,6 +161,10 @@ jobs: - name: Upgrade Chrome Driver run: ./vendor/bin/testbench dusk:chrome-driver --detect + - name: Downgrade Chrome Driver to 126 for Laravel 9 + if: matrix.laravel == '9.*' + run: ./vendor/bin/testbench dusk:chrome-driver 126 + - name: Prepare Testbench Dusk run: ./vendor/bin/testbench-dusk package:discover From 60db99b8f28be1083200235ce5eae83bce3bdc20 Mon Sep 17 00:00:00 2001 From: Quentin Renard Date: Mon, 14 Oct 2024 04:24:51 +0200 Subject: [PATCH 4/9] Fix L9 tests due to Dusk 7 not supporting Chrome > 126 --- .github/workflows/main.yml | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index f2a520029..047c28e5b 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -155,16 +155,19 @@ jobs: env: CACHE_STORE: array - - name: Upgrade Chrome + - name: Upgrade Chrome (Laravel 9) + if: matrix.laravel == '9.*' uses: browser-actions/setup-chrome@latest + with: + chrome_version: 126 + - name: Upgrade Chrome + if: matrix.laravel != '9.*' + uses: browser-actions/setup-chrome@latest + - name: Upgrade Chrome Driver run: ./vendor/bin/testbench dusk:chrome-driver --detect - - name: Downgrade Chrome Driver to 126 for Laravel 9 - if: matrix.laravel == '9.*' - run: ./vendor/bin/testbench dusk:chrome-driver 126 - - name: Prepare Testbench Dusk run: ./vendor/bin/testbench-dusk package:discover From dedaf10e879241b47d73c05851064ef2b2692006 Mon Sep 17 00:00:00 2001 From: Quentin Renard Date: Mon, 14 Oct 2024 04:28:11 +0200 Subject: [PATCH 5/9] Fix L9 tests due to Dusk 7 not supporting Chrome > 126 --- .github/workflows/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 047c28e5b..287936790 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -159,7 +159,7 @@ jobs: if: matrix.laravel == '9.*' uses: browser-actions/setup-chrome@latest with: - chrome_version: 126 + chrome-version: 126 - name: Upgrade Chrome if: matrix.laravel != '9.*' From 8cbc2d7db53d0db896c67ffaee606e3b27c39c02 Mon Sep 17 00:00:00 2001 From: Quentin Renard Date: Mon, 14 Oct 2024 04:37:14 +0200 Subject: [PATCH 6/9] Fix L9 tests due to Dusk 7 not supporting Chrome > 126 --- .github/workflows/main.yml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 287936790..10f863198 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -164,8 +164,13 @@ jobs: - name: Upgrade Chrome if: matrix.laravel != '9.*' uses: browser-actions/setup-chrome@latest - + + - name: Upgrade Chrome Driver (Laravel 9) + if: matrix.laravel == '9.*' + run: ./vendor/bin/testbench dusk:chrome-driver 126 + - name: Upgrade Chrome Driver + if: matrix.laravel != '9.*' run: ./vendor/bin/testbench dusk:chrome-driver --detect - name: Prepare Testbench Dusk From ff88b204ceb560923813a6373f752478215898c0 Mon Sep 17 00:00:00 2001 From: Quentin Renard Date: Mon, 14 Oct 2024 05:16:05 +0200 Subject: [PATCH 7/9] Fix GitHub Actions upload artefact v4 usage --- .github/workflows/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 10f863198..9a86c5f88 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -193,7 +193,7 @@ jobs: - uses: actions/upload-artifact@v4 if: always() with: - name: screenshots-${{ matrix.os }}-${{ matrix.php }}-${{ matrix.laravel }}-${{ matrix.dbal }} + name: screenshots-${{ matrix.os }}-${{ matrix.php }}-${{ matrix.laravel//\*/_ }}-${{ matrix.dbal//\*/_ }} path: | tests/Browser/screenshots/ tests/Browser/console/ From 985fe37b10f57e0a49a8bf9f0b62a3fd8198e493 Mon Sep 17 00:00:00 2001 From: Quentin Renard Date: Mon, 14 Oct 2024 05:21:58 +0200 Subject: [PATCH 8/9] Fix GitHub Actions upload artefact v4 usage --- .github/workflows/main.yml | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 9a86c5f88..a6c2435c7 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -190,10 +190,21 @@ jobs: with: files: .github/clover.xml - - uses: actions/upload-artifact@v4 - if: always() + - name: Replace asterisks in Laravel + run: echo "REPLACED_LARAVEL=${MATRIX_LARAVEL//\*/_}" >> $GITHUB_ENV + env: + MATRIX_LARAVEL: ${{ matrix.laravel }} + + - name: Replace asterisks in DBAL + id: replace_dbal + run: echo "REPLACED_DBAL=${MATRIX_DBAL//\*/_}" >> $GITHUB_ENV + env: + MATRIX_DBAL: ${{ matrix.dbal }} + + - name: Upload artifact + uses: actions/upload-artifact@v4 with: - name: screenshots-${{ matrix.os }}-${{ matrix.php }}-${{ matrix.laravel//\*/_ }}-${{ matrix.dbal//\*/_ }} + name: screenshots-${{ matrix.os }}-${{ matrix.php }}-${{ env.REPLACED_LARAVEL }}-${{ env.REPLACED_DBAL }} path: | tests/Browser/screenshots/ tests/Browser/console/ From 90e3f2d2e0a85ac3b382cb5de01b6dad56cc266b Mon Sep 17 00:00:00 2001 From: Quentin Renard Date: Mon, 14 Oct 2024 05:43:07 +0200 Subject: [PATCH 9/9] CI: Separate out Laravel 9 tests --- .github/workflows/main.yml | 38 ++------------------------------------ 1 file changed, 2 insertions(+), 36 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index a6c2435c7..521f661ee 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -65,25 +65,17 @@ jobs: fail-fast: false matrix: os: [ubuntu-latest] - php: [8.3, 8.2, 8.1, 8.0] - laravel: [9.*, 10.*, 11.*] + php: [8.3, 8.2, 8.1] + laravel: [10.*, 11.*] dbal: [3.*, 4.*] exclude: - - laravel: 9.* - dbal: 4.* - laravel: 10.* dbal: 4.* - - laravel: 10.* - php: 8.0 - - laravel: 11.* - php: 8.0 - laravel: 11.* php: 8.1 - laravel: 11.* dbal: 3.* include: - - laravel: 9.* - testbench: 7.* - laravel: 10.* testbench: 8.* - laravel: 11.* @@ -128,15 +120,6 @@ jobs: composer require "laravel/framework:${{ matrix.laravel }}" "orchestra/testbench:${{ matrix.testbench }}" "doctrine/dbal:${{ matrix.dbal }}" --no-interaction --no-update composer install --prefer-dist --no-interaction --no-plugins - - name: Patch TestCase files for PHP < 8.1 - run: | - if php -r 'exit(version_compare(PHP_VERSION, "8.1.0", "<") ? 0 : 1);'; then - for file in tests/integration/TestCase.php tests/Browser/BrowserTestCase.php; do - sed -i 's/protected function onNotSuccessfulTest(Throwable \$t): never/protected function onNotSuccessfulTest(Throwable \$t): void/' "$file"; - echo "Patched $file for PHP < 8.1"; - done - fi - - name: Setup Node.js uses: actions/setup-node@v1 with: @@ -155,32 +138,15 @@ jobs: env: CACHE_STORE: array - - name: Upgrade Chrome (Laravel 9) - if: matrix.laravel == '9.*' - uses: browser-actions/setup-chrome@latest - with: - chrome-version: 126 - - name: Upgrade Chrome - if: matrix.laravel != '9.*' uses: browser-actions/setup-chrome@latest - - name: Upgrade Chrome Driver (Laravel 9) - if: matrix.laravel == '9.*' - run: ./vendor/bin/testbench dusk:chrome-driver 126 - - name: Upgrade Chrome Driver - if: matrix.laravel != '9.*' run: ./vendor/bin/testbench dusk:chrome-driver --detect - name: Prepare Testbench Dusk run: ./vendor/bin/testbench-dusk package:discover - - name: Set PHPUnit config for Laravel 9 - if: matrix.laravel == '9.*' - run: | - cp phpunit-legacy.xml phpunit.xml - - name: Execute all tests run: vendor/bin/phpunit --stop-on-error env: