Skip to content

Commit

Permalink
Makefile: modernize
Browse files Browse the repository at this point in the history
  • Loading branch information
f3l1x committed Jul 3, 2023
1 parent f5a5508 commit 5ee7bf4
Showing 1 changed file with 12 additions and 11 deletions.
23 changes: 12 additions & 11 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
.PHONY: install qa cs csf phpstan tests coverage-clover coverage-html
.PHONY: install qa cs csf phpstan tests coverage

install:
composer update
Expand All @@ -7,22 +7,23 @@ qa: phpstan cs

cs:
ifdef GITHUB_ACTION
vendor/bin/codesniffer -q --report=checkstyle src tests | cs2pr
vendor/bin/phpcs --standard=ruleset.xml --encoding=utf-8 --colors -nsp -q --report=checkstyle src tests | cs2pr
else
vendor/bin/codesniffer src tests
vendor/bin/phpcs --standard=ruleset.xml --encoding=utf-8 --colors -nsp src tests
endif

csf:
vendor/bin/codefixer src tests
vendor/bin/phpcbf --standard=ruleset.xml --encoding=utf-8 --colors -nsp src tests

phpstan:
vendor/bin/phpstan analyse -l 8 -c phpstan.neon src
vendor/bin/phpstan analyse -c phpstan.neon

tests:
vendor/bin/tester -s -p php --colors 1 -C tests/cases
vendor/bin/tester -s -p php --colors 1 -C tests/Cases

coverage-clover:
vendor/bin/tester -s -p phpdbg --colors 1 -C --coverage ./coverage.xml --coverage-src ./src tests/cases

coverage-html:
vendor/bin/tester -s -p phpdbg --colors 1 -C --coverage ./coverage.html --coverage-src ./src tests/cases
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

0 comments on commit 5ee7bf4

Please sign in to comment.