@@ -35,13 +35,17 @@ runs:
35
35
CLIENT_LIBS_TEST_IMAGE : " redislabs/client-libs-test:${{ inputs.redis-version }}"
36
36
run : |
37
37
set -e
38
+
39
+ echo "::group::Installing dependencies"
38
40
pip install -U setuptools wheel
39
41
pip install -r requirements.txt
40
42
pip install -r dev_requirements.txt
41
43
if [ "${{inputs.parser-backend}}" == "hiredis" ]; then
42
44
pip install hiredis${{inputs.hiredis-version}}
43
45
fi
46
+ echo "::endgroup::"
44
47
48
+ echo "::group::Starting Redis servers"
45
49
redis_major_version=$(echo "$REDIS_VERSION" | grep -oP '^\d+')
46
50
47
51
if (( redis_major_version < 8 )); then
@@ -69,36 +73,33 @@ runs:
69
73
fi
70
74
71
75
sleep 10 # time to settle
76
+ echo "::endgroup::"
72
77
shell : bash
73
78
74
79
- name : Run RESP2 tests
75
- run : |
76
- if [ "${{inputs.event-loop}}" == "uvloop" ]; then
77
- invoke standalone-tests --redis-mod-url=${REDIS_MOD_URL} --uvloop --protocol=2
78
- invoke cluster-tests --uvloop --protocol=2
79
- else
80
- invoke standalone-tests --redis-mod-url=${REDIS_MOD_URL} --protocol=2
81
- invoke cluster-tests --protocol=2
82
- fi
83
- shell : bash
84
-
85
- - name : Run RESP3 tests
86
80
run : |
87
- if [ "${{inputs.event-loop}}" == "uvloop" ]; then
88
- invoke standalone-tests --redis-mod-url=${REDIS_MOD_URL} --uvloop -- protocol=3
89
-
90
- # hiredis does not support RESP3 on cluster
91
- if [ "${{inputs.parser-backend }}" != 'hiredis' ]; then
92
- invoke cluster-tests -- uvloop --protocol=3
81
+ run_tests() {
82
+ local protocol=$1
83
+ local eventloop=""
84
+
85
+ if [ "${{inputs.event-loop }}" == "uvloop" ]; then
86
+ eventloop="-- uvloop"
93
87
fi
94
- else
95
- invoke standalone-tests --redis-mod-url=${REDIS_MOD_URL} --protocol=3
96
-
97
- # hiredis does not support RESP3 on cluster
98
- if [ "${{inputs.parser-backend}}" != 'hiredis' ]; then
99
- invoke cluster-tests --uvloop --protocol=3
88
+
89
+ echo "::group::RESP${protocol} standalone tests"
90
+ echo "REDIS_MOD_URL=${REDIS_MOD_URL}"
91
+ invoke standalone-tests --redis-mod-url=${REDIS_MOD_URL} $eventloop --protocol=${protocol}
92
+ echo "::endgroup::"
93
+
94
+ if [ "$protocol" == "2" ] || [ "${{inputs.parser-backend}}" != 'hiredis' ]; then
95
+ echo "::group::RESP${protocol} cluster tests"
96
+ invoke cluster-tests $eventloop --protocol=${protocol}
97
+ echo "::endgroup::"
100
98
fi
101
- fi
99
+ }
100
+
101
+ run_tests 2
102
+ run_tests 3
102
103
shell : bash
103
104
104
105
- name : Upload test results and profiling data
0 commit comments