-
Notifications
You must be signed in to change notification settings - Fork 1.3k
/
build-and-test-all.sh
executable file
·81 lines (54 loc) · 1.38 KB
/
build-and-test-all.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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
#! /bin/bash -e
KEEP_RUNNING=
ASSEMBLE_ONLY=
USE_EXISTING_CONTAINERS=
DATABASE_SERVICES="dynamodblocal mysql dynamodblocal-init"
while [ ! -z "$*" ] ; do
case $1 in
"--keep-running" )
KEEP_RUNNING=yes
;;
"--assemble-only" )
ASSEMBLE_ONLY=yes
;;
"--use-existing-containers" )
USE_EXISTING_CONTAINERS=yes
;;
"--help" )
echo ./build-and-test-all.sh --keep-running --assemble-only --use-existing-containers
exit 0
;;
esac
shift
done
echo KEEP_RUNNING=$KEEP_RUNNING
# TODO Temporarily
./gradlew --parallel buildContracts
./gradlew --parallel compileAll
if [ -z "$USE_EXISTING_CONTAINERS" ] ; then
./gradlew :composeDown
fi
./gradlew infrastructureComposeUp
echo mysql is started
# Test ./mysql-cli.sh
echo 'show databases;' | ./mysql-cli.sh -i
if [ -z "$ASSEMBLE_ONLY" ] ; then
./gradlew -x :ftgo-end-to-end-tests:test $* build
./gradlew $* integrationTest
./gradlew infrastructureComposeDown
./gradlew infrastructureComposeUp
./gradlew cleanComponentTest
# ./gradlew :ftgo-delivery-service:componentTest
# ./gradlew :ftgo-order-service:componentTest
./gradlew componentTest
./gradlew :composeDown
else
./gradlew $* assemble
fi
./gradlew :composeUp
./run-end-to-end-tests.sh
# NEED TO FIX
# ./run-graphql-api-gateway-tests.sh
if [ -z "$KEEP_RUNNING" ] ; then
./gradlew :composeDown
fi