Skip to content

Commit a152432

Browse files
committed
Adding detailed logging for Setup Test environment step in the github test actions
1 parent 3343294 commit a152432

2 files changed

Lines changed: 19 additions & 1 deletion

File tree

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

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,23 @@ runs:
7878
echo "::endgroup::"
7979
8080
echo "::group::Starting Redis servers"
81-
redis_major_version=$(echo "$REDIS_VERSION" | grep -oP '^\d+')
81+
set -x
82+
# Check if REDIS_VERSION is in the custom map
83+
mapped_version=""
84+
if [[ -n "${REDIS_VERSION_CUSTOM_MAP:-}" ]]; then
85+
for mapping in $REDIS_VERSION_CUSTOM_MAP; do
86+
tag="${mapping%%:*}"
87+
version="${mapping##*:}"
88+
if [[ "$REDIS_VERSION" == "$tag" ]]; then
89+
mapped_version="$version"
90+
echo "Found custom mapping: $REDIS_VERSION -> $mapped_version"
91+
break
92+
fi
93+
done
94+
fi
95+
# Use mapped version if found, otherwise use REDIS_VERSION
96+
version_to_parse="${mapped_version:-$REDIS_VERSION}"
97+
redis_major_version=$(echo "$version_to_parse" | grep -oP '^\d+')
8298
echo "REDIS_MAJOR_VERSION=${redis_major_version}" >> $GITHUB_ENV
8399
84100
if (( redis_major_version < 8 )); then
@@ -117,6 +133,7 @@ runs:
117133
fi
118134
119135
sleep 10 # time to settle
136+
set +x
120137
echo "::endgroup::"
121138
shell: bash
122139

.github/workflows/integration.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ env:
3131
# for example after 8.2.1 is published, 8.2 image contains 8.2.1 content
3232
CURRENT_CLIENT_LIBS_TEST_STACK_IMAGE_TAG: '8.4.0'
3333
CURRENT_REDIS_VERSION: '8.4.0'
34+
REDIS_VERSION_CUSTOM_MAP: 'custom-21651605017-debian-amd64:8.6'
3435

3536
jobs:
3637
dependency-audit:

0 commit comments

Comments
 (0)