Skip to content
Snippets Groups Projects
Commit e933c09c authored by Camille Simiand's avatar Camille Simiand Committed by Sebastien
Browse files

Fix pre-commit hook scripts order and remove ESLint for now

parent ee2bfcd6
Branches
Tags
3 merge requests!43tuleap-83-access-my-capsules,!42Draft: access-my-capsules-conflicts-fixed,!40Draft: Tuleap 83 access my capsules
......@@ -10,15 +10,6 @@ fi
composer="$docker composer"
npm="$docker npm"
echo -e "\n ${BOLD} Starting Unit and Functional Tests...\n ${NORMAL}"
$composer tests
if [ $? != 0 ]; then
echo -e "\n ${REDBOLD} Unit tests failed \n ${NORMAL}"
exit 1;
else
echo -e "\n ${GREENBOLD} Unit and functional tests passed successfully! ${NORMAL} \n"
fi
echo -e "\n ${BOLD} Starting PHP_CodeSniffer... \n ${NORMAL}"
$composer phpcs
if [ $? != 0 ]; then
......@@ -34,16 +25,41 @@ if [ $? != 0 ]; then
echo -e "\n ${REDBOLD} PHPStan verification failed \n ${NORMAL}"
exit 1;
else
echo -e "\n ${GREENBOLD} Your code passed static analysis successfully! \n
\n Committing your changes now... \n ${NORMAL}"
echo -e "\n ${GREENBOLD} Your code passed static analysis successfully! \n${NORMAL}"
fi
echo -e "\n ${BOLD} Starting prepare database for tests... \n ${NORMAL}"
$docker php bin/console doctrine:database:drop --if-exists --force --no-interaction --env=test && \
$docker php bin/console doctrine:database:create --if-not-exists --no-interaction --env=test && \
$docker php bin/console doctrine:migration:migrate --all-or-nothing --no-interaction --env=test && \
#$docker php bin/console doctrine:schema:validate --env=test && \
$docker php bin/console doctrine:fixture:load --no-interaction --env=test
if [ $? != 0 ]; then
echo -e "\n ${REDBOLD} Database preparation for tests failed \n ${NORMAL}"
exit 1;
else
echo -e "\n ${GREENBOLD} Database preparation for tests passed successfully \n ${NORMAL}"
fi
echo -e "\n ${BOLD} Starting ESLint... \n ${NORMAL}"
$npm run lint
echo -e "\n ${BOLD} Starting Unit and Functional Tests...\n ${NORMAL}"
$composer tests
if [ $? != 0 ]; then
echo -e "\n ${REDBOLD} ESLint verification failed \n ${NORMAL}"
echo -e "\n ${REDBOLD} Unit tests failed \n ${NORMAL}"
exit 1;
else
echo -e "\n ${GREENBOLD} Your code passed JS linter successfully! \n
\n Committing your changes now... \n ${NORMAL}"
echo -e "\n ${GREENBOLD} Unit and functional tests passed successfully! ${NORMAL} \n"
fi
#echo -e "\n ${BOLD} Starting ESLint... \n ${NORMAL}"
#$npm run lint
#if [ $? != 0 ]; then
# echo -e "\n ${REDBOLD} ESLint verification failed \n ${NORMAL}"
# exit 1;
#else
# echo -e "\n ${GREENBOLD} Your code passed JS linter successfully! \n
# \n Committing your changes now... \n ${NORMAL}"
#fi
echo -e "\n${GREENBOLD}Committing your changes now... \n ${NORMAL}"
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment