From 8e14eb86b3b39fc0bade13a2e4f26a6f5df16c8c Mon Sep 17 00:00:00 2001 From: Bruno Fontes Date: Fri, 28 Jun 2019 00:54:06 -0300 Subject: [PATCH] Added Makefile to install the hook for automatic test --- Makefile | 8 ++++++++ composer.json | 5 ++++- pre-push.sh | 2 +- 3 files changed, 13 insertions(+), 2 deletions(-) create mode 100644 Makefile mode change 100644 => 100755 pre-push.sh diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..4b49b48 --- /dev/null +++ b/Makefile @@ -0,0 +1,8 @@ +install: + composer update + chmod +x ./pre-push.sh + mkdir -p .git/hooks + ln -fs ../../pre-push.sh .git/hooks/pre-push + +uninstall: + rm -f ./.git/hooks/pre-push diff --git a/composer.json b/composer.json index 1409ed3..3918706 100644 --- a/composer.json +++ b/composer.json @@ -20,5 +20,8 @@ "type": "vcs", "url": "https://github.com/brunofontes/Memsource-API" } - ] + ], + "require-dev": { + "phpunit/phpunit": "^8.2" + } } diff --git a/pre-push.sh b/pre-push.sh old mode 100644 new mode 100755 index 753b160..490abf6 --- a/pre-push.sh +++ b/pre-push.sh @@ -1 +1 @@ -phpunit --bootstrap vendor/autoload.php tests --testdox --color +./vendor/phpunit/phpunit/phpunit --bootstrap vendor/autoload.php tests --testdox --color