-
-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathMakefile
96 lines (80 loc) · 1.94 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
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
.PHONY: all build lint lint-fix test test-integration test-unit test-static repl generate-fixtures process-reports compile clean help
IMAGE?=latest
PHP=docker compose run --rm php
all: test
build:
docker-compose build $(IMAGE)
vendor:
$(PHP) composer install
lint: vendor
$(PHP) composer lint
lint-fix: vendor
$(PHP) composer lint-fix
test: vendor
$(PHP) composer test
test-integration: vendor
$(PHP) composer test:integration
test-unit: vendor
$(PHP) composer test:unit
test-static: vendor
$(PHP) composer test:static
repl: vendor
$(PHP) composer repl
compile: vendor
$(PHP) composer compile
clean:
$(PHP) rm -rf vendor composer.lock
generate-fixtures:
$(PHP) composer generate-fixtures
process-reports:
$(PHP) bash -c "test -e build/logs/clover.xml && sed -i 's/\/app\///' build/logs/clover.xml"
help:
@echo "Run mtxpc test suite"
@echo ""
@echo "Usage:"
@echo " make [command] [IMAGE=<image>]"
@echo ""
@echo "Commands:"
@echo ""
@echo " $$ make help"
@echo " Display this message"
@echo ""
@echo " $$ make build"
@echo " Re-builds Docker image"
@echo ""
@echo " $$ make compile"
@echo " Build Phar"
@echo ""
@echo " $$ make clean"
@echo " Delete Composer dependencies"
@echo ""
@echo " $$ make install"
@echo " Install Composer dependencies"
@echo ""
@echo " $$ make lint"
@echo " Check code style"
@echo ""
@echo " $$ make lint-fix"
@echo " Try to fix code style"
@echo ""
@echo " $$ make test"
@echo " Run linter, static and unit tests"
@echo ""
@echo " $$ make test-unit"
@echo " Run only unit tests"
@echo ""
@echo " $$ make test-static"
@echo " Run only static tests"
@echo ""
@echo " $$ make repl"
@echo " Start read-eval-print loop shell"
@echo ""
@echo " $$ make generate-fixtures"
@echo " Generates test fixtures"
@echo ""
@echo " $$ make process-reports"
@echo " Formats test reports to use relative local file paths"
@echo ""
@echo "Images:"
@echo ""
@echo " latest"