diff --git a/.travis.yml b/.travis.yml index b950c32..d95efb8 100644 --- a/.travis.yml +++ b/.travis.yml @@ -15,9 +15,7 @@ install: script: - cd ${TRAVIS_BUILD_DIR} - - composer lint - - composer sniff - - composer stan + - composer test after_script: - cd ${TRAVIS_BUILD_DIR} diff --git a/composer.json b/composer.json index 686aca0..ce9f58c 100644 --- a/composer.json +++ b/composer.json @@ -29,10 +29,23 @@ "phpstan/phpstan-phpunit": "^0.11.2" }, "scripts": { - "lint": "php -l ./src/", - "sniff": "./vendor/bin/phpcs -s --standard=PSR2 ./src/ ./tests/", - "test": "./vendor/bin/phpunit --coverage-clover ./tests/logs/clover.xml", - "stan": "./vendor/bin/phpstan analyse --level 7 src tests", + "lint": [ + "find src -name '*.php' -print0 | xargs -0 -n1 php -l", + "find tests -name '*.php' -print0 | xargs -0 -n1 php -l" + ], + "cs": "phpcs --standard=PSR2 -n src tests", + "cbf": "phpcbf --standard=PSR2 -n src tests", + "unit": "phpunit --colors=always --coverage-clover ./tests/logs/clover.xml", + "stan": "phpstan analyse --level 7 src tests", + "test": [ + "@lint", + "@unit", + "@cs", + "@stan" + ], + "release": [ + "release VERSION" + ], "coveralls": "php ./vendor/bin/php-coveralls -v" } }