diff --git a/.github/actions/run-tests/action.yml b/.github/actions/run-tests/action.yml index 20cceb922b..56c601b615 100644 --- a/.github/actions/run-tests/action.yml +++ b/.github/actions/run-tests/action.yml @@ -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 @@ -57,27 +57,26 @@ 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 @@ -85,19 +84,19 @@ runs: 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 @@ -105,32 +104,32 @@ runs: - 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 diff --git a/.github/workflows/integration.yaml b/.github/workflows/integration.yaml index ba746189ad..e3024713e7 100644 --- a/.github/workflows/integration.yaml +++ b/.github/workflows/integration.yaml @@ -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']