forked from JeroenDeDauw/JsonDumpReader
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
35 lines (24 loc) · 931 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
34
35
# 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 covers composer
DEFAULT_GOAL := ci
ci: test cs
travis: covers travis-unit cs
travis-unit:
docker-compose run --rm app ./vendor/bin/phpunit --printer="PHPUnit\TextUI\ResultPrinter"
test: covers phpunit
cs: phpcs
phpunit:
docker-compose run --rm app ./vendor/bin/phpunit
phpcs:
docker-compose run --rm app ./vendor/bin/phpcs -p -s
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))