Skip to content

Commit

Permalink
Enhancement: Install phpunit/phpunit for Phar tests with composer
Browse files Browse the repository at this point in the history
  • Loading branch information
localheinz committed Feb 4, 2024
1 parent 514f790 commit 128b3bf
Show file tree
Hide file tree
Showing 7 changed files with 1,665 additions and 3 deletions.
8 changes: 7 additions & 1 deletion .github/workflows/integrate.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -220,8 +220,14 @@ jobs:
- name: "Show info about phpunit-slow-test-detector.phar with humbug/box"
run: ".phive/box info ${{ env.PHPUNIT_SLOW_TEST_DETECTOR_PHAR }} --ansi --list"

- name: "Install ${{ matrix.dependencies }} dependencies with composer"
uses: "ergebnis/.github/actions/composer/install@1.9.0"
with:
dependencies: "${{ matrix.dependencies }}"
working-directory: "test/Phar/Version10/"

- name: "Run phar tests with phpunit/phpunit"
run: ".phive/phpunit --colors=always --configuration=test/Phar/Version10/phpunit.xml"
run: "test/Phar/Version10/vendor/bin/phpunit --colors=always --configuration=test/Phar/Version10/phpunit.xml"

dependency-analysis:
name: "Dependency Analysis"
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
/.build/
/.note/
/.phive/
/test/Phar/Version10/vendor/
/vendor/
!/.phive/phars.xml
1 change: 0 additions & 1 deletion .phive/phars.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,4 @@
<phive xmlns="https://phar.io/phive">
<phar name="humbug/box" version="^4.4.0" installed="4.4.0" location="./.phive/box" copy="false"/>
<phar name="composer-require-checker" version="~3.8.0" installed="3.8.0" location="./.phive/composer-require-checker" copy="false"/>
<phar name="phpunit" version="^10.4.1" installed="10.4.1" location="./.phive/phpunit" copy="false"/>
</phive>
3 changes: 2 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,8 @@ phar: phive ## Builds a phar with humbug/box
.phive/box compile --config=box.json
git checkout HEAD -- composer.json composer.lock
.phive/box info .build/phar/phpunit-slow-test-detector.phar --list
.phive/phpunit --configuration=test/Phar/Version10/phpunit.xml
composer install --no-interaction --no-progress --working-dir=test/Phar/Version10/
test/Phar/Version10/vendor/bin/phpunit --configuration=test/Phar/Version10/phpunit.xml

.PHONY: phive
phive: .phive ## Installs dependencies with phive
Expand Down
15 changes: 15 additions & 0 deletions test/Phar/Version10/composer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"require": {
"php": "~8.1.0"
},
"require-dev": {
"phpunit/phpunit": "^10.0.0"
},
"config": {
"platform": {
"php": "8.1.27"
},
"preferred-install": "dist",
"sort-packages": true
}
}
Loading

0 comments on commit 128b3bf

Please sign in to comment.