Skip to content

Dropping integration tests with Redis 6.2 from pipeline actions. #3659

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 6 commits into from
Jun 2, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
43 changes: 21 additions & 22 deletions .github/actions/run-tests/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ runs:
CLIENT_LIBS_TEST_IMAGE_TAG: ${{ inputs.redis-version }}
run: |
set -e

echo "::group::Installing dependencies"
pip install -r dev_requirements.txt
pip uninstall -y redis # uninstall Redis package installed via redis-entraid
Expand All @@ -57,80 +57,79 @@ runs:
pip install -e ./hiredis-py
else
pip install "hiredis${{inputs.hiredis-version}}"
fi
fi
echo "PARSER_BACKEND=$(echo "${{inputs.parser-backend}}_${{inputs.hiredis-version}}" | sed 's/[^a-zA-Z0-9]/_/g')" >> $GITHUB_ENV
else
echo "PARSER_BACKEND=${{inputs.parser-backend}}" >> $GITHUB_ENV
fi
echo "::endgroup::"

echo "::group::Starting Redis servers"
redis_major_version=$(echo "$REDIS_VERSION" | grep -oP '^\d+')
echo "REDIS_MAJOR_VERSION=${redis_major_version}" >> $GITHUB_ENV

if (( redis_major_version < 8 )); then
echo "Using redis-stack for module tests"
# Mapping of redis version to stack version

# Mapping of redis version to stack version
declare -A redis_stack_version_mapping=(
["7.4.2"]="rs-7.4.0-v2"
["7.2.7"]="rs-7.2.0-v14"
["6.2.17"]="rs-6.2.6-v18"
)

if [[ -v redis_stack_version_mapping[$REDIS_VERSION] ]]; then
export CLIENT_LIBS_TEST_STACK_IMAGE_TAG=${redis_stack_version_mapping[$REDIS_VERSION]}
echo "REDIS_MOD_URL=redis://127.0.0.1:6479/0" >> $GITHUB_ENV
else
echo "Version not found in the mapping."
exit 1
fi

if (( redis_major_version < 7 )); then
export REDIS_STACK_EXTRA_ARGS="--tls-auth-clients optional --save ''"
export REDIS_EXTRA_ARGS="--tls-auth-clients optional --save ''"
export REDIS_EXTRA_ARGS="--tls-auth-clients optional --save ''"
fi

invoke devenv --endpoints=all-stack
else
echo "Using redis CE for module tests"
echo "REDIS_MOD_URL=redis://127.0.0.1:6379" >> $GITHUB_ENV
invoke devenv --endpoints all
fi
fi

sleep 10 # time to settle
echo "::endgroup::"
shell: bash

- name: Run tests
run: |
set -e

run_tests() {
local protocol=$1
local eventloop=""

if [ "${{inputs.event-loop}}" == "uvloop" ]; then
eventloop="--uvloop"
fi

echo "::group::RESP${protocol} standalone tests"
echo "REDIS_MOD_URL=${REDIS_MOD_URL}"

if (( $REDIS_MAJOR_VERSION < 7 )) && [ "$protocol" == "3" ]; then
echo "Skipping module tests: Modules doesn't support RESP3 for Redis versions < 7"
invoke standalone-tests --redis-mod-url=${REDIS_MOD_URL} $eventloop --protocol="${protocol}" --extra-markers="not redismod and not cp_integration"
else
else
invoke standalone-tests --redis-mod-url=${REDIS_MOD_URL} $eventloop --protocol="${protocol}"
fi

echo "::endgroup::"

echo "::group::RESP${protocol} cluster tests"
invoke cluster-tests $eventloop --protocol=${protocol}
echo "::endgroup::"
echo "::endgroup::"
}

run_tests 2 "${{inputs.event-loop}}"
run_tests 3 "${{inputs.event-loop}}"
shell: bash
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/integration.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ jobs:
max-parallel: 15
fail-fast: false
matrix:
redis-version: ['8.0.1-pre', '${{ needs.redis_version.outputs.CURRENT }}', '7.2.7', '6.2.17']
redis-version: ['8.0.1-pre', '${{ needs.redis_version.outputs.CURRENT }}', '7.2.7']
python-version: ['3.9', '3.13']
parser-backend: ['plain']
event-loop: ['asyncio']
Expand Down
Loading