@@ -210,8 +210,53 @@ jobs:
210
210
- name : Assert that git tree is clean
211
211
run : git diff || echo "Run 'php build/scripts/generate-global-assert-wrappers.php' to regenerate global assert wrappers!"
212
212
213
- build-and-test-phar :
214
- name : Build and test PHAR
213
+ build-phar :
214
+ name : Build PHAR
215
+
216
+ runs-on : ubuntu-latest
217
+
218
+ env :
219
+ PHP_EXTENSIONS : none, dom, json, fileinfo, iconv, libxml, mbstring, pdo_sqlite, phar, soap, tokenizer, xml, xmlwriter
220
+ PHP_INI_VALUES : assert.exception=1, phar.readonly=0, zend.assertions=1
221
+
222
+ strategy :
223
+ matrix :
224
+ php-version :
225
+ - " 8.1"
226
+
227
+ steps :
228
+ - name : Checkout
229
+ uses : actions/checkout@v2
230
+
231
+ - name : Install PHP with extensions
232
+ uses : shivammathur/setup-php@v2
233
+ with :
234
+ php-version : ${{ matrix.php-version }}
235
+ coverage : none
236
+ extensions : ${{ env.PHP_EXTENSIONS }}
237
+ ini-values : ${{ env.PHP_INI_VALUES }}
238
+ tools : none
239
+
240
+ - name : Install java
241
+ uses : actions/setup-java@v1
242
+ with :
243
+ java-version : 1.8
244
+
245
+ - name : Build PHAR
246
+ run : ant phar-snapshot
247
+
248
+ - name : Upload PHAR
249
+ uses : actions/upload-artifact@v2
250
+ with :
251
+ name : phpunit-snapshot-phar
252
+ path : ./build/artifacts/phpunit-snapshot.phar
253
+ retention-days : 7
254
+
255
+ test-phar :
256
+ name : Test PHAR
257
+
258
+ needs :
259
+ - build-phar
215
260
216
261
runs-on : ubuntu-latest
217
262
@@ -246,12 +291,14 @@ jobs:
246
291
with :
247
292
java-version : 1.8
248
293
249
- - name : Build PHAR and run the PHAR-specific tests with it
250
- run : ant build-phar-and-run-phar-specific-tests
251
-
252
- - uses : actions/upload-artifact@v2
253
- if : ${{ matrix.php-version == 8.1 }}
294
+ - name : Download PHAR
295
+ uses : actions/download-artifact@v2
254
296
with :
255
297
name : phpunit-snapshot-phar
256
- path : ./build/artifacts/phpunit-snapshot.phar
257
- retention-days : 7
298
+ path : ./build/artifacts/
299
+
300
+ - name : Make PHAR exexutable
301
+ run : chmod +x ./build/artifacts/phpunit-snapshot.phar
302
+
303
+ - name : Run PHAR-specific tests
304
+ run : ant run-phar-specific-tests
0 commit comments