Skip to content

Commit

Permalink
CI: Separate out Laravel 9 tests
Browse files Browse the repository at this point in the history
  • Loading branch information
ifox authored Oct 14, 2024
1 parent 985fe37 commit 90e3f2d
Showing 1 changed file with 2 additions and 36 deletions.
38 changes: 2 additions & 36 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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.*
Expand Down Expand Up @@ -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:
Expand All @@ -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:
Expand Down

0 comments on commit 90e3f2d

Please sign in to comment.