Skip to content

Commit

Permalink
makefile updates for vagrant
Browse files Browse the repository at this point in the history
  • Loading branch information
Daniel Bowen committed Sep 19, 2017
1 parent 61e4618 commit 2522154
Showing 1 changed file with 16 additions and 3 deletions.
19 changes: 16 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,28 @@

.PHONY: help test testdox testcoverage

VAGRANT_BOX := crucial-web

help:
@echo "Please use \`make <target>' where <target> 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

0 comments on commit 2522154

Please sign in to comment.