Skip to content

Commit 4f5f47d

Browse files
committed
Test against unstable hiredis-py
1 parent 77e8db2 commit 4f5f47d

File tree

2 files changed

+16
-3
lines changed

2 files changed

+16
-3
lines changed

.github/actions/run-tests/action.yml

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,13 @@ runs:
2828
python-version: ${{ inputs.python-version }}
2929
cache: 'pip'
3030

31+
- uses: actions/checkout@v4
32+
if: ${{ inputs.parser-backend == 'hiredis' && inputs.hiredis-version == 'unstable' }}
33+
with:
34+
repository: redis/hiredis-py
35+
submodules: true
36+
path: hiredis-py
37+
3138
- name: Setup Test environment
3239
env:
3340
REDIS_VERSION: ${{ inputs.redis-version }}
@@ -40,8 +47,13 @@ runs:
4047
pip uninstall -y redis # uninstall Redis package installed via redis-entraid
4148
pip install -e .[jwt] # install the working copy
4249
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
50+
if [[ "${{inputs.hiredis-version}}" == "unstable" ]]; then
51+
echo "Installing unstable version of hiredis from local directory"
52+
pip install -e ./hiredis-py
53+
else
54+
pip install "hiredis${{inputs.hiredis-version}}"
55+
fi
56+
echo "PARSER_BACKEND=$(echo "${{inputs.parser-backend}}_${{inputs.hiredis-version}}" | sed 's/[^a-zA-Z0-9]/_/g')" >> $GITHUB_ENV
4557
else
4658
echo "PARSER_BACKEND=${{inputs.parser-backend}}" >> $GITHUB_ENV
4759
fi
@@ -86,6 +98,7 @@ runs:
8698
shell: bash
8799

88100
- name: Run tests
101+
continue-on-error: ${{ inputs.parser-backend == 'hiredis' && inputs.hiredis-version == 'unstable' }}
89102
run: |
90103
set -e
91104

.github/workflows/integration.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ jobs:
125125
redis-version: [ '${{ needs.redis_version.outputs.CURRENT }}' ]
126126
python-version: [ '3.8', '3.13']
127127
parser-backend: [ 'hiredis' ]
128-
hiredis-version: [ '>=3.0.0', '<3.0.0' ]
128+
hiredis-version: [ '>=3.0.0', '<3.0.0', 'unstable' ]
129129
event-loop: [ 'asyncio' ]
130130
env:
131131
ACTIONS_ALLOW_UNSECURE_COMMANDS: true

0 commit comments

Comments
 (0)