From 2522154268c242a9292f8f5aebf3bfcc6645cec6 Mon Sep 17 00:00:00 2001 From: Daniel Bowen Date: Tue, 19 Sep 2017 13:33:53 -0500 Subject: [PATCH] makefile updates for vagrant --- Makefile | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index 5ad6a29..8ff807c 100644 --- a/Makefile +++ b/Makefile @@ -6,15 +6,28 @@ .PHONY: help test testdox testcoverage +VAGRANT_BOX := crucial-web + help: @echo "Please use \`make ' where is one of" @grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}' -test: ## Run the unit tests +start: ## [HOST] Start the Vagrant box + @cd ~/Sandbox/vagrant; vagrant up $(VAGRANT_BOX) + @$(MAKE) ssh + +stop: ## [HOST] Suspend the Vagrant box + @cd ~/Sandbox/vagrant; vagrant suspend $(VAGRANT_BOX) + +ssh: ## [HOST] SSH to the Vagrant box + @cd ~/Sandbox/vagrant; vagrant ssh $(VAGRANT_BOX) \ + --command 'cd /vagrant/chargify-sdk-php && /bin/bash' + +test: ## [GUEST] Run the unit tests @cd tests/phpunit && ../../vendor/bin/phpunit -testdox: ## Run the unit tests with testdox output +testdox: ## [GUEST] Run the unit tests with testdox output @cd tests/phpunit && ../../vendor/bin/phpunit --testdox -testcoverage: ## Run the unit tests and generate a code coverage report +testcoverage: ## [GUEST] Run the unit tests and generate a code coverage report @cd tests/phpunit && ../../vendor/bin/phpunit --coverage-html artifacts/coverage \ No newline at end of file