Support for PHP 8.4 #985
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: run-stub-tests | |
on: [push, pull_request] | |
jobs: | |
stub-test: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: true | |
matrix: | |
os: [ubuntu-22.04, windows-latest] | |
php: [8.4, 8.3, 8.2] | |
laravel: [11.0, 10.2] | |
exclude: | |
- php: 8.4 | |
laravel: 10.0 | |
name: Test Stubs ${{ matrix.os }} - P${{ matrix.php }} - L${{ matrix.laravel }} | |
steps: | |
- name: Setup PHP | |
uses: shivammathur/setup-php@v2 | |
with: | |
php-version: ${{ matrix.php }} | |
extensions: dom, curl, libxml, mbstring, zip, pcntl, pdo, sqlite, pdo_sqlite, bcmath, soap, intl, gd, exif, iconv, imagick, mysql, mysqli, pdo_mysql, fileinfo | |
coverage: none | |
- name: Setup Laravel | |
run: | | |
composer create-project laravel/laravel:^${{ matrix.laravel }} . | |
composer require protonemedia/laravel-splade | |
- name: Remove installed Splade (Unix) | |
run: rm -rf vendor/protonemedia/laravel-splade | |
if: matrix.os == 'ubuntu-22.04' | |
- name: Remove installed Splade (Windows) | |
run: rd "vendor/protonemedia/laravel-splade" /s /q | |
shell: cmd | |
if: matrix.os == 'windows-latest' | |
- name: Checkout code | |
uses: actions/[email protected] | |
with: | |
path: "vendor/protonemedia/laravel-splade" | |
- name: Install Splade | |
run: | | |
composer dump | |
php artisan splade:install | |
- name: Install NPM dependencies | |
run: | | |
npm i | |
npm i autosize choices.js flatpickr | |
- name: Remove installed Splade and copy front-end build from Checkout (Unix) | |
run: | | |
rm -rf node_modules/@protonemedia/laravel-splade/dist | |
cp -R vendor/protonemedia/laravel-splade/dist node_modules/@protonemedia/laravel-splade/ | |
if: matrix.os == 'ubuntu-22.04' | |
- name: Remove installed Splade and copy front-end build from Checkout (Windows) | |
run: | | |
rd "node_modules/@protonemedia/laravel-splade/dist" /s /q | |
mkdir "node_modules/@protonemedia/laravel-splade/dist" | |
xcopy "vendor/protonemedia/laravel-splade/dist" "node_modules/@protonemedia/laravel-splade/dist" /E /I | |
shell: cmd | |
if: matrix.os == 'windows-latest' | |
- name: Compile assets | |
run: npm run build | |
- name: Run Laravel Server (Unix) | |
run: php artisan serve & | |
if: matrix.os == 'ubuntu-22.04' | |
- name: Run Test (Unix) | |
run: php vendor/protonemedia/laravel-splade/TestStubs.php | |
if: matrix.os == 'ubuntu-22.04' | |
- name: Run Laravel Server (Windows) and Run Test | |
run: | | |
start /b cmd /v:on /c "(php artisan serve) &" | |
php vendor/protonemedia/laravel-splade/TestStubs.php | |
shell: cmd | |
if: matrix.os == 'windows-latest' | |
- name: Start SSR server (Unix) | |
run: | | |
echo "SPLADE_SSR_ENABLED=true" >> .env | |
node bootstrap/ssr/ssr.js & | |
if: matrix.os == 'ubuntu-22.04' | |
- name: Run Test command (Unix) | |
run: php artisan splade:ssr-test | |
if: matrix.os == 'ubuntu-22.04' | |
- name: Start SSR server (Windows) and Run Test command | |
run: | | |
echo "SPLADE_SSR_ENABLED=true" >> .env | |
node bootstrap/ssr/ssr.js & | |
php artisan splade:ssr-test | |
if: matrix.os == 'windows-latest' |