@@ -14,6 +14,10 @@ inputs:
1414 description : ' hiredis version to test against'
1515 required : false
1616 default : ' >3.0.0'
17+ hiredis-branch :
18+ description : ' hiredis branch to test against'
19+ required : false
20+ default : ' master'
1721 event-loop :
1822 description : ' Event loop to use'
1923 required : false
2832 python-version : ${{ inputs.python-version }}
2933 cache : ' pip'
3034
35+ - uses : actions/checkout@v4
36+ if : ${{ inputs.parser-backend == 'hiredis' && inputs.hiredis-version == 'unstable' }}
37+ with :
38+ repository : redis/hiredis-py
39+ submodules : true
40+ path : hiredis-py
41+ ref : ${{ inputs.hiredis-branch }}
42+
3143 - name : Setup Test environment
3244 env :
3345 REDIS_VERSION : ${{ inputs.redis-version }}
4052 pip uninstall -y redis # uninstall Redis package installed via redis-entraid
4153 pip install -e .[jwt] # install the working copy
4254 if [ "${{inputs.parser-backend}}" == "hiredis" ]; then
43- pip install "hiredis${{inputs.hiredis-version}}"
44- echo "PARSER_BACKEND=$(echo "${{inputs.parser-backend}}_${{inputs.hiredis-version}}" | sed 's/[^a-zA-Z0-9]/_/g')" >> $GITHUB_ENV
55+ if [[ "${{inputs.hiredis-version}}" == "unstable" ]]; then
56+ echo "Installing unstable version of hiredis from local directory"
57+ pip install -e ./hiredis-py
58+ else
59+ pip install "hiredis${{inputs.hiredis-version}}"
60+ fi
61+ echo "PARSER_BACKEND=$(echo "${{inputs.parser-backend}}_${{inputs.hiredis-version}}" | sed 's/[^a-zA-Z0-9]/_/g')" >> $GITHUB_ENV
4562 else
4663 echo "PARSER_BACKEND=${{inputs.parser-backend}}" >> $GITHUB_ENV
4764 fi
@@ -108,12 +125,10 @@ runs:
108125 fi
109126
110127 echo "::endgroup::"
111-
112- if [ "$protocol" == "2" ] || [ "${{inputs.parser-backend}}" != 'hiredis' ]; then
113- echo "::group::RESP${protocol} cluster tests"
114- invoke cluster-tests $eventloop --protocol=${protocol}
115- echo "::endgroup::"
116- fi
128+
129+ echo "::group::RESP${protocol} cluster tests"
130+ invoke cluster-tests $eventloop --protocol=${protocol}
131+ echo "::endgroup::"
117132 }
118133
119134 run_tests 2 "${{inputs.event-loop}}"
0 commit comments