@@ -2,7 +2,6 @@ name: Build and Test
2
2
3
3
on :
4
4
merge_group :
5
- workflow_dispatch :
6
5
pull_request_target :
7
6
types :
8
7
- opened
36
35
steps :
37
36
- uses : actions/checkout@v4
38
37
with :
39
- ref : ${{ github.event.pull_request.head.sha || github.ref }}
38
+ ref : ${{ github.event.pull_request.merge_commit_sha || github.ref }}
40
39
41
40
- id : set-matrix
42
41
run : echo "matrix=$(jq -c . < ./.github/workflows/matrix.json)" >> $GITHUB_OUTPUT
@@ -53,14 +52,14 @@ jobs:
53
52
steps :
54
53
- uses : actions/checkout@v4
55
54
with :
56
- ref : ${{ github.event.pull_request.head.sha || github.ref }}
55
+ ref : ${{ github.event.pull_request.merge_commit_sha || github.ref }}
57
56
58
57
- uses : ./.github/actions/setup
59
58
with :
60
59
php : ${{ matrix.php }}
61
60
62
- composer-normalize :
63
- name : Composer Normalize
61
+ pest :
62
+ name : PEST
64
63
needs : [configure, prepare]
65
64
runs-on : ubuntu-latest
66
65
@@ -71,16 +70,23 @@ jobs:
71
70
steps :
72
71
- uses : actions/checkout@v4
73
72
with :
74
- ref : ${{ github.event.pull_request.head.sha || github.ref }}
73
+ ref : ${{ github.event.pull_request.merge_commit_sha || github.ref }}
75
74
76
75
- uses : ./.github/actions/setup
77
76
with :
78
77
php : ${{ matrix.php }}
78
+ coverage : pcov
79
79
80
- - run : composer normalize --dry-run --diff
80
+ - run : composer pest:ci
81
81
82
- composer-validate :
83
- name : Composer Validate
82
+ - if : ${{ matrix.php == fromJson(needs.configure.outputs.matrix).include[0].php }}
83
+ uses :
codecov/codecov-action@eaaf4bedf32dbdc6b720b63067d99c4d77d6047d # [email protected]
84
+ with :
85
+ directory : ./coverage/
86
+ flags : unittestsvalidate
87
+
88
+ phpstan :
89
+ name : PHPStan
84
90
needs : [configure, prepare]
85
91
runs-on : ubuntu-latest
86
92
@@ -91,16 +97,16 @@ jobs:
91
97
steps :
92
98
- uses : actions/checkout@v4
93
99
with :
94
- ref : ${{ github.event.pull_request.head.sha || github.ref }}
100
+ ref : ${{ github.event.pull_request.merge_commit_sha || github.ref }}
95
101
96
102
- uses : ./.github/actions/setup
97
103
with :
98
104
php : ${{ matrix.php }}
99
105
100
- - run : composer validate --strict --with-dependencies
106
+ - run : composer phpstan
101
107
102
- pest :
103
- name : PEST
108
+ psalm :
109
+ name : Psalm
104
110
needs : [configure, prepare]
105
111
runs-on : ubuntu-latest
106
112
@@ -111,98 +117,74 @@ jobs:
111
117
steps :
112
118
- uses : actions/checkout@v4
113
119
with :
114
- ref : ${{ github.event.pull_request.head.sha || github.ref }}
120
+ ref : ${{ github.event.pull_request.merge_commit_sha || github.ref }}
115
121
116
122
- uses : ./.github/actions/setup
117
123
with :
118
124
php : ${{ matrix.php }}
119
- coverage : pcov
120
-
121
- - if : matrix.php != '8.0'
122
- run : composer pest:ci
123
125
124
- - if : matrix.php == '8.1'
125
- uses :
codecov/codecov-action@eaaf4bedf32dbdc6b720b63067d99c4d77d6047d # [email protected]
126
- with :
127
- directory : ./coverage/
128
- flags : unittestsvalidate
126
+ - run : composer psalm
129
127
130
- phpstan :
131
- name : PHPStan
128
+ rector :
129
+ name : Rector
132
130
needs : [configure, prepare]
133
131
runs-on : ubuntu-latest
134
132
135
- strategy :
136
- fail-fast : false
137
- matrix : ${{ fromJson(needs.configure.outputs.matrix) }}
138
-
139
133
steps :
140
134
- uses : actions/checkout@v4
141
135
with :
142
- ref : ${{ github.event.pull_request.head.sha || github.ref }}
136
+ ref : ${{ github.event.pull_request.merge_commit_sha || github.ref }}
143
137
144
138
- uses : ./.github/actions/setup
145
139
with :
146
- php : ${{ matrix.php }}
140
+ php : ${{ fromJson(needs.configure.outputs. matrix).include[0] .php }}
147
141
148
- - run : composer phpstan
142
+ - run : composer rector
149
143
150
- psalm :
151
- name : Psalm
144
+ php-cs-fixer :
145
+ name : PHP CS Fixer
152
146
needs : [configure, prepare]
153
147
runs-on : ubuntu-latest
154
148
155
- strategy :
156
- fail-fast : false
157
- matrix : ${{ fromJson(needs.configure.outputs.matrix) }}
158
-
159
149
steps :
160
150
- uses : actions/checkout@v4
161
151
with :
162
- ref : ${{ github.event.pull_request.head.sha || github.ref }}
152
+ ref : ${{ github.event.pull_request.merge_commit_sha || github.ref }}
163
153
164
154
- uses : ./.github/actions/setup
165
155
with :
166
- php : ${{ matrix.php }}
156
+ php : ${{ fromJson(needs.configure.outputs. matrix).include[0] .php }}
167
157
168
- - run : composer psalm
158
+ - run : composer phpcs
169
159
170
- rector :
171
- name : Rector
160
+ composer-normalize :
161
+ name : Composer Normalize
172
162
needs : [configure, prepare]
173
163
runs-on : ubuntu-latest
174
164
175
- strategy :
176
- fail-fast : false
177
- matrix : ${{ fromJson(needs.configure.outputs.matrix) }}
178
-
179
165
steps :
180
166
- uses : actions/checkout@v4
181
167
with :
182
- ref : ${{ github.event.pull_request.head.sha || github.ref }}
168
+ ref : ${{ github.event.pull_request.merge_commit_sha || github.ref }}
183
169
184
170
- uses : ./.github/actions/setup
185
171
with :
186
- php : ${{ matrix.php }}
172
+ php : ${{ fromJson(needs.configure.outputs. matrix).include[0] .php }}
187
173
188
- - run : composer rector
174
+ - run : composer normalize --dry-run --diff
189
175
190
- php-cs-fixer :
191
- name : PHP CS Fixer
176
+ composer-validate :
177
+ name : Composer Validate
192
178
needs : [configure, prepare]
193
179
runs-on : ubuntu-latest
194
180
195
- strategy :
196
- fail-fast : false
197
- matrix : ${{ fromJson(needs.configure.outputs.matrix) }}
198
-
199
181
steps :
200
182
- uses : actions/checkout@v4
201
183
with :
202
- ref : ${{ github.event.pull_request.head.sha || github.ref }}
184
+ ref : ${{ github.event.pull_request.merge_commit_sha || github.ref }}
203
185
204
186
- uses : ./.github/actions/setup
205
187
with :
206
- php : ${{ matrix.php }}
188
+ php : ${{ fromJson(needs.configure.outputs. matrix).include[0] .php }}
207
189
208
- - run : composer phpcs
190
+ - run : composer validate --strict --with-dependencies
0 commit comments