Skip to content

Commit b0fa21e

Browse files
committed
Enhancement: Split compiling and testing Phar
1 parent 325ccd7 commit b0fa21e

File tree

1 file changed

+30
-7
lines changed

1 file changed

+30
-7
lines changed

.github/workflows/integrate.yaml

+30-7
Original file line numberDiff line numberDiff line change
@@ -220,14 +220,13 @@ jobs:
220220
- name: "Show info about phpunit-slow-test-detector.phar with humbug/box"
221221
run: ".phive/box info ${{ env.PHPUNIT_SLOW_TEST_DETECTOR_PHAR }} --ansi --list"
222222

223-
- name: "Install ${{ matrix.dependencies }} dependencies for running phar tests with composer"
224-
uses: "ergebnis/.github/actions/composer/[email protected].0"
223+
- name: "Upload Phar"
224+
uses: "actions/[email protected].0"
225225
with:
226-
dependencies: "${{ matrix.dependencies }}"
227-
working-directory: "test/Phar/Version10/"
228-
229-
- name: "Run phar tests with phpunit/phpunit"
230-
run: "test/Phar/Version10/vendor/bin/phpunit --colors=always --configuration=test/Phar/Version10/phpunit.xml"
226+
name: "phpunit-slow-test-detector-phar"
227+
overwrite: true
228+
path: "${{ env.PHPUNIT_SLOW_TEST_DETECTOR_PHAR }}"
229+
retention-days: 1
231230

232231
dependency-analysis:
233232
name: "Dependency Analysis"
@@ -451,6 +450,9 @@ jobs:
451450

452451
timeout-minutes: 5
453452

453+
needs:
454+
- "compile-phar"
455+
454456
strategy:
455457
fail-fast: false
456458
matrix:
@@ -510,6 +512,9 @@ jobs:
510512
php-version: "8.3"
511513
dependencies: "highest"
512514

515+
env:
516+
PHPUNIT_SLOW_TEST_DETECTOR_PHAR: ".build/phar/phpunit-slow-test-detector.phar"
517+
513518
steps:
514519
- name: "Checkout"
515520
uses: "actions/[email protected]"
@@ -591,3 +596,21 @@ jobs:
591596
- name: "Run end-to-end tests with phpunit/phpunit:11.0.x-dev"
592597
if: "matrix.phpunit-version == '11.0.x-dev'"
593598
run: "vendor/bin/phpunit --colors=always --configuration=test/EndToEnd/Version11/phpunit.xml"
599+
600+
- name: "Download Phar"
601+
if: "matrix.phpunit-version == '10.0.0'"
602+
uses: "actions/[email protected]"
603+
with:
604+
name: "phpunit-slow-test-detector-phar"
605+
path: "${{ env.PHPUNIT_SLOW_TEST_DETECTOR_PHAR }}"
606+
607+
- name: "Install ${{ matrix.dependencies }} dependencies for running phar tests with composer"
608+
if: "matrix.phpunit-version == '10.0.0'"
609+
uses: "ergebnis/.github/actions/composer/[email protected]"
610+
with:
611+
dependencies: "${{ matrix.dependencies }}"
612+
working-directory: "test/Phar/Version10/"
613+
614+
- name: "Run phar tests with phpunit/phpunit:10.0.0"
615+
if: "matrix.phpunit-version == '10.0.0'"
616+
run: "test/Phar/Version10/vendor/bin/phpunit --colors=always --configuration=test/Phar/Version10/phpunit.xml"

0 commit comments

Comments
 (0)