Skip to content

Commit fec42ac

Browse files
committed
Makefile: modernize
1 parent ee3f56c commit fec42ac

File tree

1 file changed

+22
-12
lines changed

1 file changed

+22
-12
lines changed

Makefile

Lines changed: 22 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,34 @@
1-
.PHONY: install qa cs csf phpstan tests coverage-clover coverage-html
2-
1+
.PHONY: install
32
install:
43
composer update
54

5+
.PHONY: qa
66
qa: phpstan cs
77

8+
.PHONY: cs
89
cs:
9-
vendor/bin/codesniffer src tests
10+
ifdef GITHUB_ACTION
11+
vendor/bin/phpcs --standard=ruleset.xml --encoding=utf-8 --extensions="php,phpt" --colors -nsp -q --report=checkstyle src tests | cs2pr
12+
else
13+
vendor/bin/phpcs --standard=ruleset.xml --encoding=utf-8 --extensions="php,phpt" --colors -nsp src tests
14+
endif
1015

16+
.PHONY: csf
1117
csf:
12-
vendor/bin/codefixer src tests
18+
vendor/bin/phpcbf --standard=ruleset.xml --encoding=utf-8 --extensions="php,phpt" --colors -nsp src tests
1319

20+
.PHONY: phpstan
1421
phpstan:
15-
vendor/bin/phpstan analyse -l 8 -c phpstan.neon src
22+
vendor/bin/phpstan analyse -c phpstan.neon
1623

24+
.PHONY: tests
1725
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
26+
vendor/bin/tester -s -p php --colors 1 -C tests/Cases
27+
28+
.PHONY: coverage
29+
coverage:
30+
ifdef GITHUB_ACTION
31+
vendor/bin/tester -s -p phpdbg --colors 1 -C --coverage coverage.xml --coverage-src src tests/Cases
32+
else
33+
vendor/bin/tester -s -p phpdbg --colors 1 -C --coverage coverage.html --coverage-src src tests/Cases
34+
endif

0 commit comments

Comments
 (0)