-
Notifications
You must be signed in to change notification settings - Fork 18
/
Makefile
50 lines (37 loc) · 1.82 KB
/
Makefile
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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
.DEFAULT_GOAL := help
help:
@echo ""
@echo "Available tasks:"
@echo " deps-update-dev Install dependencies"
@echo " deps-update-prod Install dependencies"
@echo " deps-install-dev Install dependencies"
@echo " deps-install-prod Install dependencies"
@echo " lint Run linter and code style checker"
@echo " unit Run unit tests and generate"
@echo " unit-cov Run unit tests and generate coverage"
@echo " unit-html Run unit tests and generate coverage, html"
@echo " test Run linter and unit tests"
@echo " watch Run linter and unit tests when any of the source files change"
@echo " all Install dependencies and run linter and unit tests"
@echo ""
deps-update-dev:
composer update --prefer-dist --no-ansi --no-interaction --optimize-autoloader --ignore-platform-reqs
deps-update-prod:
composer update --prefer-dist --no-ansi --no-interaction --optimize-autoloader --ignore-platform-reqs --no-dev
deps-install-dev:
composer install --prefer-dist --no-ansi --no-interaction --optimize-autoloader --ignore-platform-reqs
deps-install-prod:
composer install --prefer-dist --no-ansi --no-interaction --optimize-autoloader --ignore-platform-reqs --no-dev
lint:
vendor/bin/phplint . --exclude=vendor/
vendor/bin/phpcs -p --standard=PSR2 --extensions=php --encoding=utf-8 --ignore=*/vendor/*,*/benchmarks/* .
unit:
vendor/bin/phpunit
unit-cov:
vendor/bin/phpunit --coverage-text --coverage-clover=coverage.xml
unit-html:
vendor/bin/phpunit --coverage-text --coverage-clover=coverage.xml --coverage-html=./report/
test: lint unit
travis: lint unit
all: deps-install-dev test
.PHONY: help deps-update-dev deps-update-prod deps-install-dev deps-install-prod lint unit unit-html test travis all