Skip to content

Commit d7dc3c4

Browse files
committed
Enhancement: Install phpunit/phpunit for Phar tests with composer
1 parent 514f790 commit d7dc3c4

File tree

7 files changed

+1665
-3
lines changed

7 files changed

+1665
-3
lines changed

.github/workflows/integrate.yaml

+7-1
Original file line numberDiff line numberDiff line change
@@ -220,8 +220,14 @@ 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]"
225+
with:
226+
dependencies: "${{ matrix.dependencies }}"
227+
working-directory: "test/Phar/Version10/"
228+
223229
- name: "Run phar tests with phpunit/phpunit"
224-
run: ".phive/phpunit --colors=always --configuration=test/Phar/Version10/phpunit.xml"
230+
run: "test/Phar/Version10/vendor/bin/phpunit --colors=always --configuration=test/Phar/Version10/phpunit.xml"
225231

226232
dependency-analysis:
227233
name: "Dependency Analysis"

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
/.build/
22
/.note/
33
/.phive/
4+
/test/Phar/Version10/vendor/
45
/vendor/
56
!/.phive/phars.xml

.phive/phars.xml

-1
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,4 @@
22
<phive xmlns="https://phar.io/phive">
33
<phar name="humbug/box" version="^4.4.0" installed="4.4.0" location="./.phive/box" copy="false"/>
44
<phar name="composer-require-checker" version="~3.8.0" installed="3.8.0" location="./.phive/composer-require-checker" copy="false"/>
5-
<phar name="phpunit" version="^10.4.1" installed="10.4.1" location="./.phive/phpunit" copy="false"/>
65
</phive>

Makefile

+2-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,8 @@ phar: phive ## Builds a phar with humbug/box
2727
.phive/box compile --config=box.json
2828
git checkout HEAD -- composer.json composer.lock
2929
.phive/box info .build/phar/phpunit-slow-test-detector.phar --list
30-
.phive/phpunit --configuration=test/Phar/Version10/phpunit.xml
30+
composer install --no-interaction --no-progress --working-dir=test/Phar/Version10/
31+
test/Phar/Version10/vendor/bin/phpunit --configuration=test/Phar/Version10/phpunit.xml
3132

3233
.PHONY: phive
3334
phive: .phive ## Installs dependencies with phive

test/Phar/Version10/composer.json

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
{
2+
"require": {
3+
"php": "~8.1.0"
4+
},
5+
"require-dev": {
6+
"phpunit/phpunit": "^10.0.0"
7+
},
8+
"config": {
9+
"platform": {
10+
"php": "8.1.27"
11+
},
12+
"preferred-install": "dist",
13+
"sort-packages": true
14+
}
15+
}

0 commit comments

Comments
 (0)