Skip to content

Commit 7cc22e0

Browse files
committed
mix of makefile and action
1 parent f8f0dd5 commit 7cc22e0

File tree

4 files changed

+31
-11
lines changed

4 files changed

+31
-11
lines changed

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

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,5 @@ runs:
4747
RCE_DOCKER: "true"
4848
RE_CLUSTER: "false"
4949
run: |
50-
go test ./... -short -race && \
51-
go test -coverprofile=coverage.txt -covermode=atomic ./... && \
50+
make test.ci
5251
shell: bash

Makefile

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,12 @@ redisstackdocker.stop:
99

1010
test: testdeps
1111
$(MAKE) redisstackdocker.start
12+
$(MAKE) test.ci
13+
$(MAKE) redisstackdocker.stop
14+
15+
testdeps: testdata/redis/src/redis-server
16+
17+
test.ci:
1218
$(eval GO_VERSION := $(shell go version | cut -d " " -f 3 | cut -d. -f2))
1319
set -e; for dir in $(GO_MOD_DIRS); do \
1420
if echo "$${dir}" | grep -q "./example" && [ "$(GO_VERSION)" = "19" ]; then \
@@ -26,9 +32,6 @@ test: testdeps
2632
done
2733
cd internal/customvet && go build .
2834
go vet -vettool ./internal/customvet/customvet
29-
$(MAKE) redisstackdocker.stop
30-
31-
testdeps: testdata/redis/src/redis-server
3235

3336
bench:
3437
go test ./... -test.run=NONE -test.bench=. -test.benchmem

docker-compose.yml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,24 @@ services:
8282
- all-stack
8383
- all
8484

85+
sentinel-cluster:
86+
image: ${CLIENT_LIBS_TEST_IMAGE:-redislabs/client-libs-test:7.4.1}
87+
container_name: redis-sentinel-cluster
88+
environment:
89+
- NODES=3
90+
- TLS_ENABLED=yes
91+
- REDIS_CLUSTER=no
92+
- PORT=9121
93+
command: ${REDIS_EXTRA_ARGS:---enable-debug-command yes --enable-module-command yes --tls-auth-clients optional --save ""}
94+
ports:
95+
- "9121-9123:9121-9123"
96+
volumes:
97+
- "./dockers/sentinel-cluster:/redis/work"
98+
profiles:
99+
- sentinel
100+
- all-stack
101+
- all
102+
85103
redisRing1:
86104
image: ${CLIENT_LIBS_TEST_IMAGE:-redislabs/client-libs-test:7.4.1}
87105
container_name: redis-ring-1

main_test.go

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -28,12 +28,12 @@ const (
2828

2929
const (
3030
sentinelName = "go-redis-test"
31-
sentinelMasterPort = "9123"
32-
sentinelSlave1Port = "9124"
33-
sentinelSlave2Port = "9125"
34-
sentinelPort1 = "9126"
35-
sentinelPort2 = "9127"
36-
sentinelPort3 = "9128"
31+
sentinelMasterPort = "9121"
32+
sentinelSlave1Port = "9122"
33+
sentinelSlave2Port = "9123"
34+
sentinelPort1 = "26379"
35+
sentinelPort2 = "26380"
36+
sentinelPort3 = "26381"
3737
)
3838

3939
var (

0 commit comments

Comments
 (0)