-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #21 from graze/docker
Docker!
- Loading branch information
Showing
3 changed files
with
64 additions
and
27 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
FROM php:5.6-cli | ||
|
||
RUN pecl install xdebug && \ | ||
echo "zend_extension=xdebug.so" >> "/usr/local/etc/php/conf.d/xdebug.ini" | ||
|
||
RUN ["docker-php-ext-install", "mbstring"] | ||
|
||
ADD . /opt/graze/queue | ||
|
||
WORKDIR /opt/graze/queue |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
SHELL = /bin/sh | ||
|
||
.PHONY: install composer clean help | ||
.PHONY: test test-unit test-intergration test-coverage test-matrix | ||
|
||
.SILENT: help | ||
|
||
install: ## Download the depenedencies 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 -it --rm \ | ||
-v $$(pwd):/app \ | ||
-v ~/.composer:/root/composer \ | ||
-v ~/.ssh/id_rsa:/root/.ssh/id_rsa:ro \ | ||
-v ~/.ssh/known_hosts:/root/.ssh/known_hosts:ro \ | ||
composer/composer:master --no-interaction $* | ||
|
||
|
||
test: ## Run the unit and intergration testsuites. | ||
test: test-unit test-intergration | ||
|
||
test-unit: ## Run the unit testsuite. | ||
docker run --rm -t graze-queue \ | ||
vendor/bin/phpunit --testsuite unit | ||
|
||
test-intergration: ## Run the integration testsuite. | ||
docker run --rm -t graze-queue \ | ||
vendor/bin/phpunit --testsuite integration | ||
|
||
test-coverage: ## Run the testsuites with coverage enabled. | ||
docker run --rm -t graze-queue \ | ||
vendor/bin/phpunit --coverage-text --testsuite unit | ||
docker run --rm -t graze-queue \ | ||
vendor/bin/phpunit --coverage-text --testsuite integration | ||
|
||
test-matrix: | ||
docker run --rm -t -v $$(pwd):/opt/graze/queue -w /opt/graze/queue php:5.5-cli \ | ||
vendor/bin/phpunit --testsuite unit | ||
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: ## Stop running containers and clean up an 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/## //' |
This file was deleted.
Oops, something went wrong.