11GO_MOD_DIRS := $(shell find . -type f -name 'go.mod' -exec dirname {} \; | sort)
2+ REDIS_VERSION ?= 8.2
3+ RE_CLUSTER ?= false
4+ RCE_DOCKER ?= true
5+ CLIENT_LIBS_TEST_IMAGE ?= redislabs/client-libs-test:8.2.1-pre
26
37docker.start :
8+ export RE_CLUSTER=$(RE_CLUSTER ) && \
9+ export RCE_DOCKER=$(RCE_DOCKER ) && \
10+ export REDIS_VERSION=$(REDIS_VERSION ) && \
11+ export CLIENT_LIBS_TEST_IMAGE=$(CLIENT_LIBS_TEST_IMAGE ) && \
412 docker compose --profile all up -d --quiet-pull
513
614docker.stop :
@@ -27,6 +35,9 @@ test.ci:
2735 set -e; for dir in $( GO_MOD_DIRS) ; do \
2836 echo " go test in $$ {dir}" ; \
2937 (cd " $$ {dir}" && \
38+ export RE_CLUSTER=$(RE_CLUSTER ) && \
39+ export RCE_DOCKER=$(RCE_DOCKER ) && \
40+ export REDIS_VERSION=$(REDIS_VERSION ) && \
3041 go mod tidy -compat=1.18 && \
3142 go vet && \
3243 go test -v -coverprofile=coverage.txt -covermode=atomic ./... -race -skip Example); \
@@ -38,6 +49,9 @@ test.ci.skip-vectorsets:
3849 set -e; for dir in $( GO_MOD_DIRS) ; do \
3950 echo " go test in $$ {dir} (skipping vector sets)" ; \
4051 (cd " $$ {dir}" && \
52+ export RE_CLUSTER=$(RE_CLUSTER ) && \
53+ export RCE_DOCKER=$(RCE_DOCKER ) && \
54+ export REDIS_VERSION=$(REDIS_VERSION ) && \
4155 go mod tidy -compat=1.18 && \
4256 go vet && \
4357 go test -v -coverprofile=coverage.txt -covermode=atomic ./... -race \
@@ -47,11 +61,17 @@ test.ci.skip-vectorsets:
4761 go vet -vettool ./internal/customvet/customvet
4862
4963bench :
64+ export RE_CLUSTER=$(RE_CLUSTER ) && \
65+ export RCE_DOCKER=$(RCE_DOCKER ) && \
66+ export REDIS_VERSION=$(REDIS_VERSION ) && \
5067 go test ./... -test.run=NONE -test.bench=. -test.benchmem -skip Example
5168
5269.PHONY : all test test.ci test.ci.skip-vectorsets bench fmt
5370
5471build :
72+ export RE_CLUSTER=$(RE_CLUSTER ) && \
73+ export RCE_DOCKER=$(RCE_DOCKER ) && \
74+ export REDIS_VERSION=$(REDIS_VERSION ) && \
5575 go build .
5676
5777fmt :
0 commit comments