-
-
Notifications
You must be signed in to change notification settings - Fork 16
/
Makefile
54 lines (38 loc) · 1.23 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
### Variables
# Applications
COMPOSER ?= /usr/bin/env composer
DEPENDENCIES ?= lastest
PHP ?= /usr/bin/env php
### Helpers
all: clean depend
.PHONY: all
### Dependencies
depend:
ifeq ($(DEPENDENCIES), lowest)
${COMPOSER} update --prefer-lowest --prefer-dist --no-interaction;
else
${COMPOSER} update --prefer-dist --no-interaction;
endif
.PHONY: depend
### QA
qa: lint phpstan phpcs audit
qa-offline: lint phpstan phpcs
lint:
find ./infrastructures ./src ./definitions ./tools -name "*.php" -exec ${PHP} -l {} \; | grep "Parse error" > /dev/null && exit 1 || exit 0
phpstan:
${PHP} -d memory_limit=512M vendor/bin/phpstan analyse src infrastructures definitions --level max
phpcs:
${PHP} vendor/bin/phpcs --standard=PSR12 --extensions=php src/ infrastructures/ definitions/ tools/
checkmethods:
${PHP} tools/console.php teknoo:sellsy:checks-methods https://api.sellsy.com/documentation/methods -i Accoundatas,Docrows
audit:
${COMPOSER} audit
.PHONY: qa qa-offline lint phpmd phpcs checkmethods audit
### Testing
test:
XDEBUG_MODE=coverage ${PHP} -d memory_limit=512M -dzend_extension=xdebug.so -dxdebug.mode=coverage vendor/bin/phpunit -c phpunit.xml --colors --coverage-text
.PHONY: test
### Cleaning
clean:
rm -rf vendor
.PHONY: clean