-
-
Notifications
You must be signed in to change notification settings - Fork 112
105 lines (85 loc) · 3.3 KB
/
run-stub-tests.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
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'