-
Notifications
You must be signed in to change notification settings - Fork 7
Expand file tree
/
Copy pathMakefile
More file actions
32 lines (21 loc) · 779 Bytes
/
Makefile
File metadata and controls
32 lines (21 loc) · 779 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
# Define directories
VENDOR_DIR ?= $(CURDIR)/vendor
# Global/default target
all: install test lint check-style
$(VENDOR_DIR):
composer install --no-interaction --prefer-dist
install-deps: $(VENDOR_DIR)
clean-deps:
rm -rf $(VENDOR_DIR)
test:
./vendor/bin/phpunit
test-with-coverage:
./vendor/bin/phpunit --coverage-text --coverage-html=report/
test-with-coverage-clover:
./vendor/bin/phpunit --coverage-text --coverage-clover=coverage.xml
lint:
# Lint all PHP files in parallel (across 8 threads)
find . -name "*.php" -not -path "./vendor/*" -print0 | xargs -n 1 -0 -P 8 php -l
check-style:
./vendor/bin/phpcs --standard=PSR2 --encoding=utf-8 -p src/ tests/
.PHONY: all install-deps clean-deps test test-with-coverage test-with-coverage-clover lint check-style