Skip to content

Commit 5f53638

Browse files
committed
stop tests with build redis from source
1 parent e422646 commit 5f53638

File tree

2 files changed

+17
-41
lines changed

2 files changed

+17
-41
lines changed

.github/workflows/build.yml

+7-27
Original file line numberDiff line numberDiff line change
@@ -10,31 +10,6 @@ permissions:
1010
contents: read
1111

1212
jobs:
13-
build:
14-
name: build
15-
runs-on: ubuntu-latest
16-
strategy:
17-
fail-fast: false
18-
matrix:
19-
go-version: [1.22.x, 1.23.x]
20-
21-
steps:
22-
- name: Set up ${{ matrix.go-version }}
23-
uses: actions/setup-go@v5
24-
with:
25-
go-version: ${{ matrix.go-version }}
26-
27-
- name: Checkout code
28-
uses: actions/checkout@v4
29-
30-
- name: Test
31-
run: make test
32-
33-
- name: Upload to Codecov
34-
uses: codecov/codecov-action@v5
35-
with:
36-
files: coverage.txt
37-
token: ${{ secrets.CODECOV_TOKEN }}
3813

3914
benchmark:
4015
name: benchmark
@@ -71,7 +46,6 @@ jobs:
7146
["8.0-M03"]="8.0-M04-pre"
7247
["7.4.2"]="rs-7.4.0-v2"
7348
)
74-
7549
if [[ -v redis_version_mapping[$REDIS_VERSION] ]]; then
7650
echo "REDIS_VERSION=${redis_version_np}" >> $GITHUB_ENV
7751
echo "REDIS_IMAGE=redis:${{ matrix.redis-version }}" >> $GITHUB_ENV
@@ -113,4 +87,10 @@ jobs:
11387
with:
11488
go-version: ${{matrix.go-version}}
11589
redis-version: ${{ matrix.redis-version }}
116-
90+
91+
- name: Upload to Codecov
92+
uses: codecov/codecov-action@v5
93+
with:
94+
files: coverage.txt
95+
token: ${{ secrets.CODECOV_TOKEN }}
96+

main_test.go

+10-14
Original file line numberDiff line numberDiff line change
@@ -51,8 +51,7 @@ var (
5151

5252
processes map[string]*redisProcess
5353

54-
redisMain *redisProcess
55-
ringShard1, ringShard2, ringShard3 *redisProcess
54+
ringShard1, ringShard2, ringShard3 *redis.Client
5655
sentinelMaster, sentinelSlave1, sentinelSlave2 *redisProcess
5756
sentinel1, sentinel2, sentinel3 *redisProcess
5857
)
@@ -120,18 +119,6 @@ var _ = BeforeSuite(func() {
120119

121120
if !RECluster && !RCEDocker {
122121

123-
redisMain, err = startRedis(redisPort)
124-
Expect(err).NotTo(HaveOccurred())
125-
126-
ringShard1, err = startRedis(ringShard1Port)
127-
Expect(err).NotTo(HaveOccurred())
128-
129-
ringShard2, err = startRedis(ringShard2Port)
130-
Expect(err).NotTo(HaveOccurred())
131-
132-
ringShard3, err = startRedis(ringShard3Port)
133-
Expect(err).NotTo(HaveOccurred())
134-
135122
sentinelMaster, err = startRedis(sentinelMasterPort)
136123
Expect(err).NotTo(HaveOccurred())
137124

@@ -159,6 +146,15 @@ var _ = BeforeSuite(func() {
159146
redisAddr = redisStackAddr
160147

161148
if !RECluster {
149+
ringShard1, err = connectTo(ringShard1Port)
150+
Expect(err).NotTo(HaveOccurred())
151+
152+
ringShard2, err = connectTo(ringShard2Port)
153+
Expect(err).NotTo(HaveOccurred())
154+
155+
ringShard3, err = connectTo(ringShard3Port)
156+
Expect(err).NotTo(HaveOccurred())
157+
162158
// populate cluster node information
163159
Expect(configureClusterTopology(ctx, cluster)).NotTo(HaveOccurred())
164160
}

0 commit comments

Comments
 (0)