Skip to content

Check for handling errors before returning when querying the sentinel to get the master address. #3230

Check for handling errors before returning when querying the sentinel to get the master address.

Check for handling errors before returning when querying the sentinel to get the master address. #3230

Workflow file for this run

name: Go
on:
push:
branches: [master, v9, v9.7]
pull_request:
branches: [master, v9, v9.7]
permissions:
contents: read
jobs:
benchmark:
name: benchmark
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
redis-version:
- "8.0-RC1" # 8.0 RC1
- "7.4.2" # should use redis stack 7.4
go-version:
- "1.23.x"
- "1.24.x"
steps:
- name: Set up ${{ matrix.go-version }}
uses: actions/setup-go@v5
with:
go-version: ${{ matrix.go-version }}
- name: Checkout code
uses: actions/checkout@v4
- name: Setup Test environment
env:
REDIS_VERSION: ${{ matrix.redis-version }}
CLIENT_LIBS_TEST_IMAGE: "redislabs/client-libs-test:${{ matrix.redis-version }}"
run: |
set -e
redis_version_np=$(echo "$REDIS_VERSION" | grep -oP '^\d+.\d+')
# Mapping of redis version to redis testing containers
declare -A redis_version_mapping=(
["8.0-RC1"]="8.0-RC1-pre"
["7.4.2"]="rs-7.4.0-v2"
)
if [[ -v redis_version_mapping[$REDIS_VERSION] ]]; then
echo "REDIS_VERSION=${redis_version_np}" >> $GITHUB_ENV
echo "REDIS_IMAGE=redis:${{ matrix.redis-version }}" >> $GITHUB_ENV
echo "CLIENT_LIBS_TEST_IMAGE=redislabs/client-libs-test:${redis_version_mapping[$REDIS_VERSION]}" >> $GITHUB_ENV
else
echo "Version not found in the mapping."
exit 1
fi
shell: bash
- name: Set up Docker Compose environment with redis ${{ matrix.redis-version }}
run: make docker.start
shell: bash
- name: Benchmark Tests
env:
RCE_DOCKER: "true"
RE_CLUSTER: "false"
run: make bench
shell: bash
test-redis-ce:
name: test-redis-ce
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
redis-version:
- "8.0-RC1" # 8.0 RC1
- "7.4.2" # should use redis stack 7.4
- "7.2.7" # should redis stack 7.2
go-version:
- "1.23.x"
- "1.24.x"
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Run tests
uses: ./.github/actions/run-tests
with:
go-version: ${{matrix.go-version}}
redis-version: ${{ matrix.redis-version }}
- name: Upload to Codecov
uses: codecov/codecov-action@v5
with:
files: coverage.txt
token: ${{ secrets.CODECOV_TOKEN }}