Skip to content

Commit a1d805d

Browse files
committed
Makefile: modernize
1 parent e604b98 commit a1d805d

File tree

1 file changed

+16
-11
lines changed

1 file changed

+16
-11
lines changed

Makefile

Lines changed: 16 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,29 @@
1-
.PHONY: install qa cs csf phpstan tests coverage-clover coverage-html
1+
.PHONY: install qa cs csf phpstan tests coverage
22

33
install:
44
composer update
55

66
qa: phpstan cs
77

88
cs:
9-
@echo "OK"
9+
ifdef GITHUB_ACTION
10+
vendor/bin/phpcs --standard=ruleset.xml --encoding=utf-8 --extensions="php,phpt" --colors -nsp -q --report=checkstyle src tests | cs2pr
11+
else
12+
vendor/bin/phpcs --standard=ruleset.xml --encoding=utf-8 --extensions="php,phpt" --colors -nsp src tests
13+
endif
1014

1115
csf:
12-
@echo "OK"
16+
vendor/bin/phpcbf --standard=ruleset.xml --encoding=utf-8 --colors -nsp src tests
1317

1418
phpstan:
15-
@echo "OK"
19+
vendor/bin/phpstan analyse -c phpstan.neon
1620

1721
tests:
18-
vendor/bin/tester -s -p php --colors 1 -C tests/cases
19-
20-
coverage-clover:
21-
vendor/bin/tester -s -p phpdbg --colors 1 -C --coverage ./coverage.xml --coverage-src ./src tests/cases
22-
23-
coverage-html:
24-
vendor/bin/tester -s -p phpdbg --colors 1 -C --coverage ./coverage.html --coverage-src ./src tests/cases
22+
vendor/bin/tester -s -p php --colors 1 -C tests/Cases
23+
24+
coverage:
25+
ifdef GITHUB_ACTION
26+
vendor/bin/tester -s -p phpdbg --colors 1 -C --coverage coverage.xml --coverage-src src tests/Cases
27+
else
28+
vendor/bin/tester -s -p phpdbg --colors 1 -C --coverage coverage.html --coverage-src src tests/Cases
29+
endif

0 commit comments

Comments
 (0)