1
1
GO_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
2
6
3
7
docker.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 ) && \
4
12
docker compose --profile all up -d --quiet-pull
5
13
6
14
docker.stop :
@@ -27,6 +35,9 @@ test.ci:
27
35
set -e; for dir in $( GO_MOD_DIRS) ; do \
28
36
echo " go test in $$ {dir}" ; \
29
37
(cd " $$ {dir}" && \
38
+ export RE_CLUSTER=$(RE_CLUSTER ) && \
39
+ export RCE_DOCKER=$(RCE_DOCKER ) && \
40
+ export REDIS_VERSION=$(REDIS_VERSION ) && \
30
41
go mod tidy -compat=1.18 && \
31
42
go vet && \
32
43
go test -v -coverprofile=coverage.txt -covermode=atomic ./... -race -skip Example); \
@@ -38,6 +49,9 @@ test.ci.skip-vectorsets:
38
49
set -e; for dir in $( GO_MOD_DIRS) ; do \
39
50
echo " go test in $$ {dir} (skipping vector sets)" ; \
40
51
(cd " $$ {dir}" && \
52
+ export RE_CLUSTER=$(RE_CLUSTER ) && \
53
+ export RCE_DOCKER=$(RCE_DOCKER ) && \
54
+ export REDIS_VERSION=$(REDIS_VERSION ) && \
41
55
go mod tidy -compat=1.18 && \
42
56
go vet && \
43
57
go test -v -coverprofile=coverage.txt -covermode=atomic ./... -race \
@@ -47,11 +61,17 @@ test.ci.skip-vectorsets:
47
61
go vet -vettool ./internal/customvet/customvet
48
62
49
63
bench :
64
+ export RE_CLUSTER=$(RE_CLUSTER ) && \
65
+ export RCE_DOCKER=$(RCE_DOCKER ) && \
66
+ export REDIS_VERSION=$(REDIS_VERSION ) && \
50
67
go test ./... -test.run=NONE -test.bench=. -test.benchmem -skip Example
51
68
52
69
.PHONY : all test test.ci test.ci.skip-vectorsets bench fmt
53
70
54
71
build :
72
+ export RE_CLUSTER=$(RE_CLUSTER ) && \
73
+ export RCE_DOCKER=$(RCE_DOCKER ) && \
74
+ export REDIS_VERSION=$(REDIS_VERSION ) && \
55
75
go build .
56
76
57
77
fmt :
0 commit comments