forked from graze/queue
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
47 lines (36 loc) · 1.48 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
SHELL = /bin/sh
.PHONY: install composer clean help
.PHONY: test test-unit test-integration test-matrix
.SILENT: help
install: ## Download the dependencies then build the image :rocket:.
make 'composer-install --optimize-autoloader --ignore-platform-reqs'
docker build --tag graze/queue:latest .
composer-%: ## Run a composer command, `make "composer-<command> [...]"`.
docker run -t --rm \
-v $$(pwd):/app \
-v ~/.composer:/root/composer \
-v ~/.ssh:/root/.ssh:ro \
composer/composer --ansi --no-interaction $*
test: ## Run the unit and integration testsuites.
test: lint test-matrix test-integration
lint: ## Run phpcs against the code.
docker run --rm -t -v $$(pwd):/opt/graze/queue graze/queue \
composer lint --ansi
test-unit: ## Run the unit testsuite.
docker run --rm -t -v $$(pwd):/opt/graze/queue graze/queue \
composer test:unit --ansi
test-integration: ## Run the integration testsuite.
docker run --rm -t -v $$(pwd):/opt/graze/queue graze/queue \
composer test:integration --ansi
test-matrix:
docker run --rm -t -v $$(pwd):/opt/graze/queue -w /opt/graze/queue php:5.6-cli \
vendor/bin/phpunit --testsuite unit
docker run --rm -t -v $$(pwd):/opt/graze/queue -w /opt/graze/queue php:7.0-cli \
vendor/bin/phpunit --testsuite unit
clean: ## Clean up any images.
docker rmi graze/queue:latest
help: ## Show this help message.
echo "usage: make [target] ..."
echo ""
echo "targets:"
fgrep --no-filename "##" $(MAKEFILE_LIST) | fgrep --invert-match $$'\t' | sed -e 's/: ## / - /'