From f77122bab86b518638b6eee47bdaa15a5feda836 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A1chym=20Tou=C5=A1ek?= Date: Wed, 8 Feb 2017 21:46:19 +0100 Subject: [PATCH] Add composer scripts --- composer.json | 13 +++++++++++++ tests.md | 9 +++------ tests/run.sh | 2 -- 3 files changed, 16 insertions(+), 8 deletions(-) delete mode 100644 tests/run.sh diff --git a/composer.json b/composer.json index f56848f..1e6a5ab 100644 --- a/composer.json +++ b/composer.json @@ -43,5 +43,18 @@ "branch-alias": { "dev-master": "1.0-dev" } + }, + "scripts": { + "all": [ + "@fix", + "@analyse", + "@test" + ], + "fix": "php-cs-fixer fix", + "analyse": "phpstan analyse --no-progress --level=4 --configuration=phpstan.neon src tests", + "test": [ + "\"vendor/bin/codecept\" build", + "\"vendor/bin/codecept\" run" + ] } } diff --git a/tests.md b/tests.md index cd6d4b5..d83020b 100644 --- a/tests.md +++ b/tests.md @@ -12,17 +12,14 @@ cd # install dependencies composer update -# check coding style -php-cs-fixer fix --dry-run - # fix coding style -php-cs-fixer fix +composer fix # static analysis -phpstan analyse --level=4 --configuration=phpstan.neon src tests +composer analyse # run tests -sh ./tests/run.sh +composer test ``` Advanced usage diff --git a/tests/run.sh b/tests/run.sh deleted file mode 100644 index e44dafd..0000000 --- a/tests/run.sh +++ /dev/null @@ -1,2 +0,0 @@ -./vendor/bin/codecept build -./vendor/bin/codecept run