Added Makefile to install the hook for automatic test

This commit is contained in:
Bruno F. Fontes 2019-06-28 00:54:06 -03:00
parent dc437d7044
commit 8e14eb86b3
3 changed files with 13 additions and 2 deletions

8
Makefile Normal file
View File

@ -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

View File

@ -20,5 +20,8 @@
"type": "vcs",
"url": "https://github.com/brunofontes/Memsource-API"
}
]
],
"require-dev": {
"phpunit/phpunit": "^8.2"
}
}

2
pre-push.sh Normal file → Executable file
View File

@ -1 +1 @@
phpunit --bootstrap vendor/autoload.php tests --testdox --color
./vendor/phpunit/phpunit/phpunit --bootstrap vendor/autoload.php tests --testdox --color