-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
33 lines (23 loc) · 909 Bytes
/
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
# If the first argument is "composer"...
ifeq (composer,$(firstword $(MAKECMDGOALS)))
# use the rest as arguments for "composer"
RUN_ARGS := $(wordlist 2,$(words $(MAKECMDGOALS)),$(MAKECMDGOALS))
# ...and turn them into do-nothing targets
$(eval $(RUN_ARGS):;@:)
endif
.PHONY: ci test phpunit cs stan covers composer
DEFAULT_GOAL := ci
ci: test cs
test: covers phpunit
cs: phpcs stan
phpunit:
docker-compose run --rm app ./vendor/bin/phpunit
phpcs:
docker-compose run --rm app ./vendor/bin/phpcs -p -s src
stan:
docker-compose run --rm app ./vendor/bin/phpstan analyse --level=1 --no-progress src/ tests/
covers:
docker-compose run --rm app ./vendor/bin/covers-validator
composer:
docker run --rm --interactive --tty --volume $(shell pwd):/app -w /app\
--volume ~/.composer:/composer --user $(shell id -u):$(shell id -g) composer composer --no-scripts $(filter-out $@,$(MAKECMDGOALS))