diff --git a/Makefile b/Makefile index 890cd85..ce4ff1f 100644 --- a/Makefile +++ b/Makefile @@ -1,18 +1,34 @@ -.PHONY: install qa cs csf phpstan tests coverage-clover coverage-html - +.PHONY: install install: composer update +.PHONY: qa qa: phpstan cs +.PHONY: cs cs: - vendor/bin/phpcs --standard=vendor/contributte/code-rules/paveljanda/ruleset.xml --extensions=php,phpt --tab-width=4 --ignore=temp -sp src +ifdef GITHUB_ACTION + vendor/bin/phpcs --standard=ruleset.xml --encoding=utf-8 --extensions="php,phpt" --colors -nsp -q --report=checkstyle src tests | cs2pr +else + vendor/bin/phpcs --standard=ruleset.xml --encoding=utf-8 --extensions="php,phpt" --colors -nsp src tests +endif +.PHONY: csf csf: - vendor/bin/phpcbf --standard=vendor/contributte/code-rules/paveljanda/ruleset.xml --extensions=php,phpt --tab-width=4 --ignore=temp -sp src + vendor/bin/phpcbf --standard=ruleset.xml --encoding=utf-8 --colors -nsp src tests +.PHONY: phpstan phpstan: - vendor/bin/phpstan analyse src -c vendor/contributte/code-rules/paveljanda/phpstan.neon --level 7 + vendor/bin/phpstan analyse -c phpstan.neon +.PHONY: tests tests: - vendor/bin/tester tests -C + vendor/bin/tester -s -p php --colors 1 -C tests/Cases + +.PHONY: coverage +coverage: +ifdef GITHUB_ACTION + vendor/bin/tester -s -p phpdbg --colors 1 -C --coverage coverage.xml --coverage-src src tests/Cases +else + vendor/bin/tester -s -p phpdbg --colors 1 -C --coverage coverage.html --coverage-src src tests/Cases +endif