Skip to content

Commit 2694966

Browse files
committed
Enhancement: Split compiling and testing Phar
1 parent d09ea05 commit 2694966

File tree

1 file changed

+29
-11
lines changed

1 file changed

+29
-11
lines changed

.github/workflows/integrate.yaml

+29-11
Original file line numberDiff line numberDiff line change
@@ -163,9 +163,6 @@ jobs:
163163
dependencies:
164164
- "locked"
165165

166-
env:
167-
PHPUNIT_SLOW_TEST_DETECTOR_PHAR: ".build/phar/phpunit-slow-test-detector.phar"
168-
169166
steps:
170167
- name: "Checkout"
171168
uses: "actions/[email protected]"
@@ -218,16 +215,15 @@ jobs:
218215
run: ".phive/box compile --ansi --config=box.json"
219216

220217
- name: "Show info about phpunit-slow-test-detector.phar with humbug/box"
221-
run: ".phive/box info ${{ env.PHPUNIT_SLOW_TEST_DETECTOR_PHAR }} --ansi --list"
218+
run: ".phive/box info .build/phar/phpunit-slow-test-detector.phar --ansi --list"
222219

223-
- name: "Install ${{ matrix.dependencies }} dependencies for running phar tests with composer"
224-
uses: "ergebnis/.github/actions/composer/[email protected].0"
220+
- name: "Upload Phar"
221+
uses: "actions/[email protected].0"
225222
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"
223+
name: "phpunit-slow-test-detector-phar"
224+
overwrite: true
225+
path: ".build/phar/phpunit-slow-test-detector.phar"
226+
retention-days: 1
231227

232228
dependency-analysis:
233229
name: "Dependency Analysis"
@@ -451,6 +447,9 @@ jobs:
451447

452448
timeout-minutes: 5
453449

450+
needs:
451+
- "compile-phar"
452+
454453
strategy:
455454
fail-fast: false
456455
matrix:
@@ -591,3 +590,22 @@ jobs:
591590
- name: "Run end-to-end tests with phpunit/phpunit:11.0.x-dev"
592591
if: "matrix.phpunit-version == '11.0.x-dev'"
593592
run: "vendor/bin/phpunit --colors=always --configuration=test/EndToEnd/Version11/phpunit.xml"
593+
594+
- name: "Download Phar"
595+
if: "matrix.phpunit-version == '10.0.0'"
596+
uses: "actions/[email protected]"
597+
with:
598+
name: "phpunit-slow-test-detector-phar"
599+
path: ".build/phar/phpunit-slow-test-detector.phar"
600+
601+
- name: "Install ${{ matrix.dependencies }} dependencies for running phar tests with composer"
602+
if: "matrix.phpunit-version == '10.0.0'"
603+
uses: "ergebnis/.github/actions/composer/[email protected]"
604+
with:
605+
dependencies: "${{ matrix.dependencies }}"
606+
working-directory: "test/Phar/Version10/"
607+
608+
- name: "Run phar tests with phpunit/phpunit"
609+
if: "matrix.phpunit-version == '10.0.0'"
610+
run: "test/Phar/Version10/vendor/bin/phpunit --colors=always --configuration=test/Phar/Version10/phpunit.xml"
611+

0 commit comments

Comments
 (0)