forked from nishangupta/Mart
-
Notifications
You must be signed in to change notification settings - Fork 19
/
Makefile
73 lines (52 loc) · 1.45 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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
#!/usr/bin/make -f
PROCESSORS_NUM := $(shell getconf _NPROCESSORS_ONLN)
GLOBAL_CONFIG := -d memory_limit=-1
# ---------------------------------------------------------------------
.PHONY: all
all: test
.PHONY: clean-all
clean-all:
rm -rf ./vendor
.PHONY: clean-build
clean-build:
git clean -Xfq bootstrap build storage storage/logs
.PHONY: clean-build-phpcs
clean-build-phpcs:
rm -rf build/phpcs.xml
.PHONY: clean-build-test
clean-build-test:
rm -rf build/phpunit
.PHONY: clean-build-coverage
clean-build-coverage: clean-build-test
rm -rf build/coverage
.PHONY: logs
logs:
tail -f storage/logs/*.log
.PHONY: phpcs
phpcs: clean-build-phpcs build/phpcs.xml
.PHONY: phpcbf
phpcbf:
php ${GLOBAL_CONFIG} vendor/bin/phpcbf --parallel=${PROCESSORS_NUM}
.PHONY: test
test: vendor .env phpcs clean-build-test build/phpunit
.PHONY: fast-test
fast-test: vendor .env fast-phpcs clean-build-test build/phpunit
.PHONY: coverage
coverage: clean-build-coverage build/coverage
open build/coverage/html/index.html
build/phpcs.xml:
mkdir -p build
php ${GLOBAL_CONFIG} vendor/bin/phpcs --parallel=${PROCESSORS_NUM} --report-junit=build/phpcs.xml
build/phpunit:
php ${GLOBAL_CONFIG} vendor/bin/phpunit --no-coverage --stop-on-failure
build/coverage:
php ${GLOBAL_CONFIG} -d xdebug.mode=coverage vendor/bin/phpunit --testdox
up:
docker-compose up -d healthy
down:
docker-compose down -v
.env:
cp .env.example .env
php artisan key:generate
vendor:
composer install