Skip to content

Commit

Permalink
Enhancement: Build phpunit-slow-test-detector.phar
Browse files Browse the repository at this point in the history
  • Loading branch information
localheinz committed May 30, 2023
1 parent f1b56fe commit f10c9fc
Show file tree
Hide file tree
Showing 15 changed files with 2,416 additions and 2,230 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/integrate.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ jobs:
- name: "Install dependencies with phive"
uses: "ergebnis/.github/actions/phive/[email protected]"
with:
trust-gpg-keys: "0x033E5F8D801A2F8D"
trust-gpg-keys: "0x2DF45277AEF09A2F,0x033E5F8D801A2F8D,0x4AA394086372C20A"

- name: "Run maglnet/composer-require-checker"
run: ".phive/composer-require-checker check --config-file=$(pwd)/composer-require-checker.json"
Expand Down
2 changes: 2 additions & 0 deletions .phive/phars.xml
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<phive xmlns="https://phar.io/phive">
<phar name="humbug/box" version="^4.3.8" installed="4.3.8" location="./.phive/box" copy="false"/>
<phar name="composer-require-checker" version="^4.5.0" installed="4.5.0" location="./.phive/composer-require-checker" copy="false"/>
<phar name="phpunit" version="^10.0.19" installed="10.0.19" location="./.phive/phpunit" copy="false"/>
</phive>
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,10 @@ For a full diff see [`2.2.0...2.2.0`][2.1.1...2.2.0].

### Changed

- Added support for installing extension as a PHAR ([#273]), by [@localheinz]

### Changed

- Suggested and required `phpunit/phpunit` as a development dependency to allow usage with `phpunit/phpunit` when installed as PHAR ([#272]), by [@localheinz]

## [`2.1.1`][2.1.1]
Expand Down Expand Up @@ -129,5 +133,6 @@ For a full diff see [`7afa59c...1.0.0`][7afa59c...1.0.0].
[#224]: https://github.com/ergebnis/phpunit-slow-test-detector/pull/224
[#243]: https://github.com/ergebnis/phpunit-slow-test-detector/pull/243
[#272]: https://github.com/ergebnis/phpunit-slow-test-detector/pull/272
[#273]: https://github.com/ergebnis/phpunit-slow-test-detector/pull/273

[@localheinz]: https://github.com/localheinz
11 changes: 10 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,19 @@ dependency-analysis: phive vendor ## Runs a dependency analysis with maglnet/com
help: ## Displays this list of targets with descriptions
@grep -E '^[a-zA-Z0-9_-]+:.*?## .*$$' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[32m%-30s\033[0m %s\n", $$1, $$2}'

.PHONY: phar
phar: phive vendor ## Builds a phar with humbug/box
.phive/box validate box.json
composer remove phpunit/phpunit --no-interaction --no-progress
.phive/box compile --config=box.json
git checkout HEAD -- composer.json composer.lock
.phive/box info .build/phar/phpunit-slow-test-detector.phar
.phive/phpunit --configuration=test/Phar/phpunit.xml

.PHONY: phive
phive: .phive ## Installs dependencies with phive
mkdir -p .build/phive/
PHIVE_HOME=.build/phive phive install --trust-gpg-keys 0x033E5F8D801A2F8D
PHIVE_HOME=.build/phive phive install --trust-gpg-keys 0x2DF45277AEF09A2F,0x033E5F8D801A2F8D,0x4AA394086372C20A

.PHONY: refactoring
refactoring: vendor ## Runs automated refactoring with rector/rector
Expand Down
14 changes: 14 additions & 0 deletions box.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"$schema": "https://raw.githubusercontent.com/humbug/box/4.3.8/res/schema.json",
"compactors": [
"KevinGH\\Box\\Compactor\\Json",
"KevinGH\\Box\\Compactor\\Php"
],
"compression": "GZ",
"files": [
"manifest.xml"
],
"git": "git",
"main": "phar/phpunit-slow-test-detector.php",
"output": ".build/phar/phpunit-slow-test-detector.phar"
}
17 changes: 1 addition & 16 deletions composer-require-checker.json
Original file line number Diff line number Diff line change
@@ -1,18 +1,3 @@
{
"symbol-whitelist": [
"PHPUnit\\Event\\Code\\Test",
"PHPUnit\\Event\\Telemetry\\Duration",
"PHPUnit\\Event\\Telemetry\\HRTime",
"PHPUnit\\Event\\Test\\Passed",
"PHPUnit\\Event\\Test\\PassedSubscriber",
"PHPUnit\\Event\\Test\\Prepared",
"PHPUnit\\Event\\Test\\PreparedSubscriber",
"PHPUnit\\Event\\TestRunner\\ExecutionFinished",
"PHPUnit\\Event\\TestRunner\\ExecutionFinishedSubscriber",
"PHPUnit\\Metadata\\Annotation\\Parser\\Registry",
"PHPUnit\\Runner\\Extension\\Extension",
"PHPUnit\\Runner\\Extension\\Facade",
"PHPUnit\\Runner\\Extension\\ParameterCollection",
"PHPUnit\\TextUI\\Configuration\\Configuration"
]
"symbol-whitelist": []
}
4 changes: 2 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,15 +22,15 @@
"source": "https://github.com/ergebnis/phpunit-slow-test-detector"
},
"require": {
"php": "~8.1.0 || ~8.2.0"
"php": "~8.1.0 || ~8.2.0",
"phpunit/phpunit": "^10.0.1"
},
"require-dev": {
"ergebnis/composer-normalize": "^2.31.0",
"ergebnis/data-provider": "^1.3.0",
"ergebnis/license": "^2.1.0",
"ergebnis/php-cs-fixer-config": "^5.7.0",
"fakerphp/faker": "^1.22.0",
"phpunit/phpunit": "^10.0.1",
"psalm/plugin-phpunit": "~0.18.4",
"rector/rector": "~0.16.0",
"vimeo/psalm": "^5.12.0"
Expand Down
Loading

0 comments on commit f10c9fc

Please sign in to comment.