Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Memorekall Member New
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Rekall
Memorekall Member New
Commits
763f39be
Verified
Commit
763f39be
authored
3 years ago
by
David Beniamine
Browse files
Options
Downloads
Patches
Plain Diff
Use docker-compose to launch pre-commit tests
parent
5cf3e548
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
tools/git-hooks/pre-commit
+8
-3
8 additions, 3 deletions
tools/git-hooks/pre-commit
with
8 additions
and
3 deletions
tools/git-hooks/pre-commit
+
8
−
3
View file @
763f39be
...
@@ -4,9 +4,14 @@ REDBOLD='\033[0;31;1m'
...
@@ -4,9 +4,14 @@ REDBOLD='\033[0;31;1m'
GREENBOLD
=
'\033[0;32;1m'
GREENBOLD
=
'\033[0;32;1m'
BOLD
=
'\033[1m'
BOLD
=
'\033[1m'
NORMAL
=
'\033[0m'
NORMAL
=
'\033[0m'
if
[
!
-z
"
$(
which docker-compose
)
"
]
;
then
composer
=
"docker-compose -f ../docker-compose.yml exec -T memorekall-member composer"
else
composer
=
composer
fi
echo
-e
"
\n
${
BOLD
}
Starting Unit and Functional Tests...
\n
${
NORMAL
}
"
echo
-e
"
\n
${
BOLD
}
Starting Unit and Functional Tests...
\n
${
NORMAL
}
"
composer tests
$
composer
tests
if
[
$?
!=
0
]
;
then
if
[
$?
!=
0
]
;
then
echo
-e
"
\n
${
REDBOLD
}
Unit tests failed
\n
${
NORMAL
}
"
echo
-e
"
\n
${
REDBOLD
}
Unit tests failed
\n
${
NORMAL
}
"
exit
1
;
exit
1
;
...
@@ -15,7 +20,7 @@ else
...
@@ -15,7 +20,7 @@ else
fi
fi
echo
-e
"
\n
${
BOLD
}
Starting PHP_CodeSniffer...
\n
${
NORMAL
}
"
echo
-e
"
\n
${
BOLD
}
Starting PHP_CodeSniffer...
\n
${
NORMAL
}
"
composer phpcs
$
composer
phpcs
if
[
$?
!=
0
]
;
then
if
[
$?
!=
0
]
;
then
echo
-e
"
\n
${
REDBOLD
}
PHPCS verification failed
\n
${
NORMAL
}
"
echo
-e
"
\n
${
REDBOLD
}
PHPCS verification failed
\n
${
NORMAL
}
"
exit
1
;
exit
1
;
...
@@ -24,7 +29,7 @@ else
...
@@ -24,7 +29,7 @@ else
fi
fi
echo
-e
"
\n
${
BOLD
}
Starting PHPStan...
\n
${
NORMAL
}
"
echo
-e
"
\n
${
BOLD
}
Starting PHPStan...
\n
${
NORMAL
}
"
composer phpstan
$
composer
phpstan
if
[
$?
!=
0
]
;
then
if
[
$?
!=
0
]
;
then
echo
-e
"
\n
${
REDBOLD
}
PHPStan verification failed
\n
${
NORMAL
}
"
echo
-e
"
\n
${
REDBOLD
}
PHPStan verification failed
\n
${
NORMAL
}
"
exit
1
;
exit
1
;
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment