Skip to content

Commit

Permalink
chore: Update tests github action
Browse files Browse the repository at this point in the history
  • Loading branch information
mckenziearts committed Aug 16, 2024
1 parent 695722d commit 23eefa9
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 8 deletions.
22 changes: 15 additions & 7 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,16 @@ jobs:
strategy:
fail-fast: false
matrix:
php: ["8.1", "8.2"]
laravel: ["^9.0", "^10.0", "^11"]
dependency-version: [ prefer-lowest, prefer-stable ]
php: [8.1, 8.2]
laravel: [9.*, 10.*, 11.*]
dependency-version: [prefer-stable]
include:
- laravel: 11.*
testbench: 9.*
- laravel: 10.*
testbench: 8.*
- laravel: 9.*
testbench: 7.*
exclude:
- laravel: 11
php: 8.1
Expand All @@ -24,10 +31,10 @@ jobs:

steps:
- name: Checkout code
uses: actions/checkout@v2
uses: actions/checkout@v3

- name: Cache dependencies
uses: actions/cache@v2
uses: actions/cache@v3
with:
path: ~/.composer/cache/files
key: dependencies-laravel-${{ matrix.laravel }}-php-${{ matrix.php }}-composer-${{ hashFiles('composer.json') }}
Expand All @@ -36,12 +43,13 @@ jobs:
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
extensions: dom, curl, libxml, mbstring, zip, pcntl, pdo, sqlite, pdo_sqlite, mysql, mysqli, pdo_mysql, bcmath, soap, intl, gd, exif, iconv, imagick, fileinfo
extensions: dom, curl, libxml, mbstring, zip, pcntl, pdo, sqlite, pdo_sqlite, bcmath, intl, exif
tools: composer:v2
coverage: none

- name: Install dependencies
run: |
composer require "laravel/framework:${{ matrix.laravel }}" --dev --no-interaction --no-update
composer require "laravel/framework:${{ matrix.laravel }}" "orchestra/testbench:${{ matrix.testbench }}" --dev --no-interaction --no-update
composer update --${{ matrix.dependency-version }} --prefer-dist --no-interaction
- name: Execute tests
run: vendor/bin/pest
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
"require-dev": {
"ciareis/bypass": "^1.0",
"laravel/pint": "^1.16",
"orchestra/testbench": "^7.22|^8.1",
"orchestra/testbench": "^7.22|^8.1|^9.0",
"pestphp/pest": "^2.34",
"phpunit/phpunit": "^9.5|^10.5"
},
Expand Down

0 comments on commit 23eefa9

Please sign in to comment.