simplify composer scripts

pull/687/head
fadrian06 7 days ago
parent 3941d44c70
commit d9cf6aa9b8

@ -20,4 +20,4 @@ jobs:
extensions: curl, mbstring
tools: composer:v2
- run: composer install
- run: composer test-ci
- run: composer test

@ -64,18 +64,30 @@
"sort-packages": true
},
"scripts": {
"test": "@php vendor/bin/phpunit",
"test-watcher": "@php vendor/bin/phpunit-watcher watch",
"test-ci": "@php vendor/bin/phpunit",
"test": "phpunit",
"test-watcher": [
"phpunit-watcher || composer global require spatie/phpunit-watcher --dev",
"phpunit-watcher watch"
],
"test-coverage": [
"rm -f clover.xml",
"@putenv XDEBUG_MODE=coverage",
"@php vendor/bin/phpunit --coverage-html=coverage --coverage-clover=clover.xml",
"@php vendor/bin/coverage-check clover.xml 100"
"phpunit --coverage-html=coverage --coverage-clover=clover.xml",
"coverage-check clover.xml 100"
],
"test-server": [
"echo \"Running Test Server\"",
"@php -S localhost:8000 -t tests/server"
],
"test-server-v2": [
"echo \"Running Test Server\"",
"@php -S localhost:8000 -t tests/server-v2"
],
"test-coverage:win": [
"del clover.xml",
"phpunit --coverage-html=coverage --coverage-clover=clover.xml",
"coverage-check clover.xml 100"
],
"test-server": "echo \"Running Test Server\" && @php -S localhost:8000 -t tests/server/",
"test-server-v2": "echo \"Running Test Server\" && @php -S localhost:8000 -t tests/server-v2/",
"test-coverage:win": "del clover.xml && phpunit --coverage-html=coverage --coverage-clover=clover.xml && coverage-check clover.xml 100",
"test-performance": [
"echo \"Running Performance Tests...\"",
"@php -S localhost:8077 -t tests/performance/ > /dev/null 2>&1 & echo $! > server.pid",
@ -86,12 +98,12 @@
"echo \"Performance Tests Completed.\""
],
"lint": "phpstan --no-progress --memory-limit=256M",
"beautify": "phpcbf --standard=phpcs.xml",
"beautify": "phpcbf",
"phpcs": "phpcs",
"post-install-cmd": [
"php -r \"if (!file_exists('phpcs.xml')) copy('phpcs.xml.dist', 'phpcs.xml');\"",
"php -r \"if (!file_exists('phpstan.neon')) copy('phpstan.dist.neon', 'phpstan.neon');\"",
"php -r \"if (!file_exists('phpunit.xml')) copy('phpunit.xml.dist', 'phpunit.xml');\""
"@php -r \"if (!file_exists('phpcs.xml')) copy('phpcs.xml.dist', 'phpcs.xml');\"",
"@php -r \"if (!file_exists('phpstan.neon')) copy('phpstan.dist.neon', 'phpstan.neon');\"",
"@php -r \"if (!file_exists('phpunit.xml')) copy('phpunit.xml.dist', 'phpunit.xml');\""
]
},
"suggest": {

Loading…
Cancel
Save