Skip to content

Commit 5731c09

Browse files
authored
Add L12 Tests
1 parent 3ee8284 commit 5731c09

File tree

2 files changed

+166
-0
lines changed

2 files changed

+166
-0
lines changed

.github/workflows/run-tests-pull.yml

Lines changed: 83 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -172,3 +172,86 @@ jobs:
172172

173173
- name: Run Visuals Tests
174174
run: php ./vendor/bin/phpunit --testsuite "Laravel Livewire Tables Visuals Test Suite" --no-coverage
175+
176+
test-laravel12:
177+
runs-on: ${{ matrix.os }}
178+
strategy:
179+
fail-fast: false
180+
max-parallel: 2
181+
matrix:
182+
os: [ubuntu-latest]
183+
php: [8.2, 8.3, 8.4]
184+
laravel: [12.*]
185+
stability: [prefer-dist]
186+
187+
name: PULL PHP-${{ matrix.php }} - Laravel-12
188+
env:
189+
extensionKey: phpextensions-${{ matrix.os }}-P${{ matrix.php }}-L${{ matrix.laravel }}
190+
extensions: dom, curl, libxml, mbstring, zip, pdo, sqlite, pdo_sqlite, bcmath, soap, intl, gd, exif, iconv, fileinfo, :psr
191+
192+
steps:
193+
- name: Checkout code
194+
uses: actions/checkout@v4
195+
196+
- name: Setup cache environment
197+
id: extcache
198+
uses: shivammathur/cache-extensions@v1
199+
with:
200+
php-version: ${{ matrix.php }}
201+
extensions: ${{ env.extensions }}
202+
key: ${{ env.extensionKey }}
203+
204+
- name: Cache extensions
205+
uses: actions/cache@v4
206+
with:
207+
path: ${{ steps.extcache.outputs.dir }}
208+
key: ${{ matrix.os }}-${{ steps.extcache.outputs.key }}
209+
restore-keys: ${{ matrix.os }}-${{ steps.extcache.outputs.key }}
210+
211+
- name: Setup PHP
212+
uses: shivammathur/setup-php@v2
213+
with:
214+
php-version: ${{ matrix.php }}
215+
extensions: ${{ env.extensions }}
216+
tools: phpunit:latest
217+
ini-values: memory_limit=512M
218+
coverage: none
219+
env:
220+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
221+
222+
- name: Setup problem matchers for PHP
223+
run: echo "::add-matcher::${{ runner.tool_cache }}/php.json"
224+
225+
- name: Get composer cache directory
226+
id: composer-cache
227+
run: |
228+
echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT
229+
230+
- uses: actions/cache@v4
231+
with:
232+
path: ${{ steps.composer-cache.outputs.dir }}
233+
key: ${{ matrix.os }}-P${{ matrix.php }}-L${{ matrix.laravel }}-composer-${{ hashFiles('**/composer.json') }}
234+
restore-keys: ${{ matrix.os }}-P${{ matrix.php }}-L${{ matrix.laravel }}-composer-
235+
236+
- name: Add token
237+
env:
238+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
239+
run: |
240+
composer config github-oauth.github.com $GITHUB_TOKEN
241+
242+
- name: Install dependencies
243+
if: steps.composer-cache.outputs.cache-hit != 'true'
244+
run: composer require "laravel/framework:${{ matrix.laravel }}.*" --no-interaction --no-update
245+
246+
- name: Update dependencies
247+
if: steps.composer-cache.outputs.cache-hit != 'true'
248+
run: composer update --${{ matrix.stability }} --no-interaction
249+
250+
- name: Setup problem matchers for PHPUnit
251+
run: echo "::add-matcher::${{ runner.tool_cache }}/phpunit.json"
252+
253+
- name: Run Unit Tests
254+
run: php ./vendor/bin/paratest --testsuite "Laravel Livewire Tables Unit Test Suite" --no-coverage
255+
256+
- name: Run Visuals Tests
257+
run: php ./vendor/bin/phpunit --testsuite "Laravel Livewire Tables Visuals Test Suite" --no-coverage

.github/workflows/run-tests.yml

Lines changed: 83 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -174,3 +174,86 @@ jobs:
174174

175175
- name: Run Visuals Tests
176176
run: php ./vendor/bin/phpunit --testsuite "Laravel Livewire Tables Visuals Test Suite" --no-coverage
177+
178+
test-laravel12:
179+
runs-on: ${{ matrix.os }}
180+
strategy:
181+
fail-fast: false
182+
max-parallel: 2
183+
matrix:
184+
os: [ubuntu-24.04]
185+
php: [8.2, 8.3, 8.4]
186+
laravel: [12.*]
187+
stability: [prefer-dist]
188+
189+
name: PHP-${{ matrix.php }} - Laravel-12
190+
env:
191+
extensionKey: phpextensions-${{ matrix.os }}-P${{ matrix.php }}
192+
extensions: dom, curl, libxml, mbstring, zip, pdo, sqlite, pdo_sqlite, bcmath, soap, intl, gd, exif, iconv, fileinfo, :psr
193+
194+
steps:
195+
- name: Checkout code
196+
uses: actions/checkout@v4
197+
198+
- name: Setup cache environment
199+
id: extcache
200+
uses: shivammathur/cache-extensions@v1
201+
with:
202+
php-version: ${{ matrix.php }}
203+
extensions: ${{ env.extensions }}
204+
key: ${{ env.extensionKey }}
205+
206+
- name: Cache extensions
207+
uses: actions/cache@v4
208+
with:
209+
path: ${{ steps.extcache.outputs.dir }}
210+
key: ${{ matrix.os }}-${{ steps.extcache.outputs.key }}
211+
restore-keys: ${{ matrix.os }}-${{ steps.extcache.outputs.key }}
212+
213+
- name: Setup PHP
214+
uses: shivammathur/setup-php@v2
215+
with:
216+
php-version: ${{ matrix.php }}
217+
extensions: ${{ env.extensions }}
218+
tools: phpunit:latest
219+
ini-values: memory_limit=512M
220+
coverage: none
221+
env:
222+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
223+
224+
- name: Setup problem matchers for PHP
225+
run: echo "::add-matcher::${{ runner.tool_cache }}/php.json"
226+
227+
- name: Get composer cache directory
228+
id: composer-cache
229+
run: |
230+
echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT
231+
232+
- uses: actions/cache@v4
233+
with:
234+
path: ${{ steps.composer-cache.outputs.dir }}
235+
key: ${{ matrix.os }}-PHP${{ matrix.php }}-L${{ matrix.laravel }}-composer-${{ hashFiles('**/composer.json') }}
236+
restore-keys: ${{ matrix.os }}-PHP${{ matrix.php }}-L${{ matrix.laravel }}-composer-
237+
238+
- name: Add token
239+
env:
240+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
241+
run: |
242+
composer config github-oauth.github.com $GITHUB_TOKEN
243+
244+
- name: Install dependencies
245+
if: steps.composer-cache.outputs.cache-hit != 'true'
246+
run: composer require "laravel/framework:${{ matrix.laravel }}.*" --no-interaction --no-update
247+
248+
- name: Update dependencies
249+
if: steps.composer-cache.outputs.cache-hit != 'true'
250+
run: composer update --${{ matrix.stability }} --no-interaction
251+
252+
- name: Setup problem matchers for PHPUnit
253+
run: echo "::add-matcher::${{ runner.tool_cache }}/phpunit.json"
254+
255+
- name: Run Unit Tests
256+
run: php ./vendor/bin/paratest --testsuite "Laravel Livewire Tables Unit Test Suite" --no-coverage
257+
258+
- name: Run Visuals Tests
259+
run: php ./vendor/bin/phpunit --testsuite "Laravel Livewire Tables Visuals Test Suite" --no-coverage

0 commit comments

Comments
 (0)