8
8
9
9
jobs :
10
10
lint :
11
+
11
12
runs-on : ubuntu-latest
13
+
14
+
12
15
steps :
13
16
- name : Checkout code
14
17
uses : actions/checkout@v2
15
18
19
+
16
20
- name : Checking for prtodo's.
17
21
run : |
18
22
if grep --exclude-dir={.git,.github,vendor} -rE "PRtodo"; then
21
25
echo "All good"
22
26
fi
23
27
28
+
24
29
- name : Checking for leftover "ray" usages.
25
30
run : |
26
31
if grep --exclude-dir={.git,.github,vendor} -rE "ray("; then
@@ -29,28 +34,35 @@ jobs:
29
34
echo "All good"
30
35
fi
31
36
37
+
32
38
- name : Setup PHP
33
39
uses : shivammathur/setup-php@v2
34
40
with :
35
41
php-version : 8.3
36
42
extensions : dom, curl, libxml, mbstring, zip, pcntl, pdo, sqlite, pdo_sqlite, bcmath, soap, intl, gd, exif, iconv, imagick, fileinfo
37
43
coverage : none
38
44
45
+
39
46
- name : Install dependencies
40
47
run : |
41
48
composer require "laravel/framework:11.*" --no-interaction --no-update
42
49
composer install
43
50
51
+
44
52
- name : Execute tests
45
53
run : vendor/bin/phpstan
46
54
55
+
47
56
- name : Check code style
48
57
run : vendor/bin/phpcs
49
58
50
59
test :
51
60
name : PHP ${{ matrix.php }} - LARAVEL ${{ matrix.laravel }} - DBAL ${{ matrix.dbal }}
61
+
52
62
timeout-minutes : 30
63
+
53
64
runs-on : ${{ matrix.os }}
65
+
54
66
services :
55
67
mysql :
56
68
image : mysql:latest
@@ -61,35 +73,43 @@ jobs:
61
73
ports :
62
74
- 3306/tcp
63
75
options : --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3
76
+
64
77
strategy :
65
78
fail-fast : false
66
79
matrix :
67
80
os : [ubuntu-latest]
68
81
php : [8.3, 8.2, 8.1]
69
- laravel : [10.*, 11.*]
70
- dbal : [3.*, 4.*]
82
+ laravel : [' 10.*', ' 11.*', '12.*' ]
83
+ dbal : [' 3.*', ' 4.*' ]
71
84
exclude :
72
85
- laravel : 10.*
73
86
dbal : 4.*
74
87
- laravel : 11.*
75
88
php : 8.1
76
89
- laravel : 11.*
77
90
dbal : 3.*
91
+ - laravel : 12.*
92
+ php : 8.1
78
93
include :
79
94
- laravel : 10.*
80
95
testbench : 8.*
81
96
- laravel : 11.*
82
97
testbench : 9.*
98
+ - laravel : 12.*
99
+ testbench : 10.*
100
+
83
101
84
102
steps :
85
103
- name : Set timezone?
86
104
87
105
with :
88
- timezoneLinux : " Europe/Paris"
106
+ timezoneLinux : Europe/Paris
107
+
89
108
90
109
- name : Checkout code
91
110
uses : actions/checkout@v2
92
111
112
+
93
113
- name : Setup PHP
94
114
uses : shivammathur/setup-php@v2
95
115
with :
@@ -99,54 +119,66 @@ jobs:
99
119
env :
100
120
COMPOSER_TOKEN : ${{ secrets.GITHUB_TOKEN }}
101
121
122
+
102
123
- name : Setup problem matchers
103
124
run : |
104
125
echo "::add-matcher::${{ runner.tool_cache }}/php.json"
105
126
echo "::add-matcher::${{ runner.tool_cache }}/phpunit.json"
106
127
128
+
107
129
- name : Get Composer Cache Directory
108
130
id : composer-cache
109
131
run : |
110
132
echo "::set-output name=dir::$(composer config cache-files-dir)"
133
+
111
134
- uses : actions/cache@v2
112
135
with :
113
136
path : ${{ steps.composer-cache.outputs.dir }}
114
137
key : ${{ matrix.os }}-${{ matrix.laravel }}-${{ matrix.php }}-${{ matrix.dbal }}-composer-${{ hashFiles('**/composer.lock') }}
115
138
restore-keys : |
116
139
${{ matrix.os }}-${{ matrix.laravel }}-${{ matrix.php }}-${{ matrix.dbal }}-composer-
117
140
141
+
118
142
- name : Install dependencies
119
143
run : |
120
144
composer require "laravel/framework:${{ matrix.laravel }}" "orchestra/testbench:${{ matrix.testbench }}" "doctrine/dbal:${{ matrix.dbal }}" --no-interaction --no-update
121
145
composer install --prefer-dist --no-interaction --no-plugins
122
146
147
+
123
148
- name : Setup Node.js
124
149
uses : actions/setup-node@v1
125
150
with :
126
- node-version : ' 20.x'
151
+ node-version : 20.x
152
+
127
153
128
154
- name : Build npm dependencies.
129
155
run : |
130
156
npm ci
131
157
158
+
132
159
- name : Create blocks dir
133
160
run : |
134
161
mkdir ./frontend/js/components/blocks/customs
135
162
163
+
136
164
- name : Build twill.
137
165
run : ./vendor/bin/testbench twill:build --forTesting
138
166
env :
139
167
CACHE_STORE : array
140
168
169
+
141
170
- name : Upgrade Chrome
142
171
uses : browser-actions/setup-chrome@latest
143
172
173
+
144
174
- name : Upgrade Chrome Driver
145
175
run : ./vendor/bin/testbench dusk:chrome-driver --detect
146
176
177
+
147
178
- name : Prepare Testbench Dusk
148
179
run : ./vendor/bin/testbench-dusk package:discover
149
180
181
+
150
182
- name : Execute all tests
151
183
run : vendor/bin/phpunit --stop-on-error
152
184
env :
@@ -156,17 +188,20 @@ jobs:
156
188
with :
157
189
files : .github/clover.xml
158
190
191
+
159
192
- name : Replace asterisks in Laravel
160
193
run : echo "REPLACED_LARAVEL=${MATRIX_LARAVEL//\*/_}" >> $GITHUB_ENV
161
194
env :
162
195
MATRIX_LARAVEL : ${{ matrix.laravel }}
163
196
197
+
164
198
- name : Replace asterisks in DBAL
165
199
id : replace_dbal
166
200
run : echo "REPLACED_DBAL=${MATRIX_DBAL//\*/_}" >> $GITHUB_ENV
167
201
env :
168
202
MATRIX_DBAL : ${{ matrix.dbal }}
169
203
204
+
170
205
- name : Upload artifact
171
206
uses : actions/upload-artifact@v4
172
207
with :
0 commit comments