This repository has been archived by the owner on Jan 10, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
install.sh
48 lines (40 loc) · 1.79 KB
/
install.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
# Install Keploy binary using curl command
curl --silent --location "https://github.com/keploy/keploy/releases/latest/download/keploy_linux_amd64.tar.gz" | tar xz -C /tmp
echo curl --silent --location "https://github.com/keploy/keploy/releases/latest/download/keploy_linux_amd64.tar.gz" | tar xz -C /tmp
sudo mv /tmp/keploy /usr/local/bin/keploy
chmod +x /usr/local/bin/keploy
echo "Keploy installed successfully 🎉"
cd ${GITHUB_WORKSPACE}/${WORKDIR}
echo "${GITHUB_WORKSPACE}/${WORKDIR}"
# Generate app binary
echo "ls"
ls
if [[ "$COMMAND" =~ .*"go".* ]]; then
echo "go is present."
go mod download
go build -o application
echo 'Test Mode Starting 🎉'
echo sudo -E keploy test -c "./application" --delay ${DELAY} --path=${KEPLOY_PATH}
sudo -E keploy test -c "./application" --delay ${DELAY} --path=${KEPLOY_PATH}
elif [[ "$COMMAND" =~ .*"node".* ]]; then
echo "Node is present."
npm install
echo 'Test Mode Starting 🎉'
echo sudo -E keploy test -c "${COMMAND}" --delay ${DELAY} --path ${KEPLOY_PATH}
sudo -E keploy test -c "${COMMAND}" --delay ${DELAY} --path ${KEPLOY_PATH}
elif [[ "$COMMAND" =~ .*"java".* ]] || [[ "$COMMAND" =~ .*"mvn".* ]]; then
echo "Java is present."
mvn clean install
echo 'Test Mode Starting 🎉'
echo sudo -E keploy test -c "${COMMAND}" --delay ${DELAY} --path ${KEPLOY_PATH}
sudo -E keploy test -c "${COMMAND}" --delay ${DELAY} --path ${KEPLOY_PATH}
elif [[ "$COMMAND" =~ .*"python".* ]] || [[ "$COMMAND" =~ .*"python3".* ]]; then
echo "Python is present."
pip install -r requirements.txt
echo 'Test Mode Starting 🎉'
echo sudo -E keploy test -c "${COMMAND}" --delay ${DELAY} --path ${KEPLOY_PATH}
sudo -E keploy test -c "${COMMAND}" --delay ${DELAY} --path ${KEPLOY_PATH}
else
echo "Language not found"
echo 'Test Mode Shutting 🎉'
fi