-
Notifications
You must be signed in to change notification settings - Fork 274
/
Copy pathintegration_test
executable file
·70 lines (55 loc) · 1.87 KB
/
integration_test
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
#!/bin/bash
set -eEuo pipefail
cd "$(dirname "$(readlink -f "$0")")"
source bash-buddy/lib/trap_error_info.sh
source bash-buddy/lib/common_utils.sh
################################################################################
# prepare
################################################################################
readonly default_build_jdk_version=11
# shellcheck disable=SC2034
PREPARE_JDKS_INSTALL_BY_SDKMAN=(
8
$default_build_jdk_version
17
)
source bash-buddy/lib/prepare_jdks.sh
source bash-buddy/lib/java_build_utils.sh
# here use `install` and `-D performRelease` intended
# to check release operations.
#
# De-activate a maven profile from command line
# https://stackoverflow.com/questions/25201430
#
# shellcheck disable=SC2034
JVB_MVN_OPTS=(
"${JVB_DEFAULT_MVN_OPTS[@]}"
-DperformRelease
-P'!gen-sign'
# FIXME com.github.spotbugs:spotbugs-maven-plugin:check failed
-P'!lint'
)
################################################################################
# ci build logic
################################################################################
cd ..
########################################
# default jdk 11, do build and test
########################################
export CI_TEST_MODE=true
export DCM_AGENT_SUPRESS_EXCEPTION_STACK=true
prepare_jdks::switch_to_jdk "$default_build_jdk_version"
cu::head_line_echo "build and test with Java: $JAVA_HOME"
jvb::mvn_cmd clean install
########################################
# test multi-version java
# shellcheck disable=SC2154
########################################
for jdk in "${PREPARE_JDKS_INSTALL_BY_SDKMAN[@]}"; do
# already tested by above `mvn install`
[ "$default_build_jdk_version" = "$jdk" ] && continue
prepare_jdks::switch_to_jdk "$jdk"
cu::head_line_echo "test with Java: $JAVA_HOME"
# just test without build
jvb::mvn_cmd surefire:test
done