@@ -34,23 +34,23 @@ jobs:
34
34
run : bundle exec rubocop
35
35
main :
36
36
name : Main
37
- timeout-minutes : 15
37
+ timeout-minutes : 5
38
+ runs-on : ubuntu-latest
38
39
strategy :
39
40
fail-fast : false
41
+ max-parallel : 4
40
42
matrix :
41
43
redis :
42
44
- ' 7.0.5'
43
45
- ' 6.2.7'
44
46
ruby :
45
47
- ' 3.2'
46
- - ' 2.7'
47
48
driver :
48
49
- ' ruby'
49
50
- ' hiredis'
50
51
docker :
51
52
- ' compose.yaml'
52
53
- ' compose.ssl.yaml'
53
- runs-on : ubuntu-latest
54
54
env :
55
55
REDIS_VERSION : ${{ matrix.redis }}
56
56
REDIS_CONNECTION_DRIVER : ${{ matrix.driver }}
@@ -75,86 +75,27 @@ jobs:
75
75
run : bundle exec rake test
76
76
- name : Stop containers
77
77
run : docker compose -f $DOCKER_COMPOSE_FILE down
78
- multiple-replicas :
79
- name : Multiple Replicas
80
- timeout-minutes : 15
81
- strategy :
82
- fail-fast : false
78
+ sub :
79
+ name : Sub
80
+ timeout-minutes : 5
83
81
runs-on : ubuntu-latest
84
- env :
85
- REDIS_VERSION : ' 7.0.5'
86
- REDIS_REPLICA_SIZE : ' 2'
87
- DOCKER_COMPOSE_FILE : ' compose.replica.yaml'
88
- steps :
89
- - name : Check out code
90
- uses : actions/checkout@v3
91
- - name : Set up Ruby
92
- uses : ruby/setup-ruby@v1
93
- with :
94
- ruby-version : ' 3.2'
95
- bundler-cache : true
96
- - name : Pull Docker images
97
- run : docker pull redis:$REDIS_VERSION
98
- - name : Run containers
99
- run : docker compose -f $DOCKER_COMPOSE_FILE up -d
100
- - name : Wait for Redis cluster to be ready
101
- run : bundle exec rake wait
102
- - name : Print containers
103
- run : docker compose -f $DOCKER_COMPOSE_FILE ps
104
- - name : Run minitest
105
- run : bundle exec rake test
106
- - name : Stop containers
107
- run : docker compose -f $DOCKER_COMPOSE_FILE down
108
- legacy-redis :
109
- name : Legacy Redis
110
- timeout-minutes : 15
111
- strategy :
112
- fail-fast : false
113
- runs-on : ubuntu-latest
114
- env :
115
- REDIS_VERSION : ' 5.0.14'
116
- DOCKER_COMPOSE_FILE : ' compose.yaml'
117
- steps :
118
- - name : Check out code
119
- uses : actions/checkout@v3
120
- - name : Set up Ruby
121
- uses : ruby/setup-ruby@v1
122
- with :
123
- ruby-version : ' 3.2'
124
- bundler-cache : true
125
- - name : Pull Docker images
126
- run : docker pull redis:$REDIS_VERSION
127
- - name : Run containers
128
- run : docker compose -f $DOCKER_COMPOSE_FILE up -d
129
- - name : Wait for Redis cluster to be ready
130
- run : bundle exec rake wait
131
- - name : Print containers
132
- run : docker compose -f $DOCKER_COMPOSE_FILE ps
133
- - name : Run minitest
134
- run : bundle exec rake test
135
- - name : Stop containers
136
- run : docker compose -f $DOCKER_COMPOSE_FILE down
137
- cluster-state :
138
- name : Cluster State
139
- timeout-minutes : 15
140
82
strategy :
141
83
fail-fast : false
142
84
matrix :
143
- redis :
144
- - ' 7.0.5'
145
- - ' 6.2.7'
146
- runs-on : ubuntu-latest
85
+ include :
86
+ - {redis: '7.0.5', ruby: '3.2', compose: compose.replica.yaml, replica: 2}
87
+ - {redis: '5.0.14', ruby: '2.7', compose: compose.yaml, replica: 1}
147
88
env :
148
89
REDIS_VERSION : ${{ matrix.redis }}
149
- REDIS_REPLICA_SIZE : ' 2 '
150
- DOCKER_COMPOSE_FILE : ' compose .replica.yaml '
90
+ DOCKER_COMPOSE_FILE : ${{ matrix.compose }}
91
+ REDIS_REPLICA_SIZE : ${{ matrix .replica }}
151
92
steps :
152
93
- name : Check out code
153
94
uses : actions/checkout@v3
154
95
- name : Set up Ruby
155
96
uses : ruby/setup-ruby@v1
156
97
with :
157
- ruby-version : ' 3.2 '
98
+ ruby-version : ${{ matrix.ruby }}
158
99
bundler-cache : true
159
100
- name : Pull Docker images
160
101
run : docker pull redis:$REDIS_VERSION
@@ -165,56 +106,28 @@ jobs:
165
106
- name : Print containers
166
107
run : docker compose -f $DOCKER_COMPOSE_FILE ps
167
108
- name : Run minitest
168
- run : bundle exec rake test_cluster_state
109
+ run : bundle exec rake test
169
110
- name : Stop containers
170
111
run : docker compose -f $DOCKER_COMPOSE_FILE down
171
- cluster-broken :
172
- name : Cluster Broken
112
+ cluster-health :
113
+ name : Cluster Health
173
114
timeout-minutes : 15
174
- strategy :
175
- fail-fast : false
176
- matrix :
177
- redis :
178
- - ' 7.0.5'
179
- - ' 6.2.7'
180
115
runs-on : ubuntu-latest
181
- env :
182
- REDIS_VERSION : ${{ matrix.redis }}
183
- DOCKER_COMPOSE_FILE : ' compose.yaml'
184
- RESTART_POLICY : ' no'
185
- steps :
186
- - name : Check out code
187
- uses : actions/checkout@v3
188
- - name : Set up Ruby
189
- uses : ruby/setup-ruby@v1
190
- with :
191
- ruby-version : ' 3.2'
192
- bundler-cache : true
193
- - name : Pull Docker images
194
- run : docker pull redis:$REDIS_VERSION
195
- - name : Run containers
196
- run : docker compose -f $DOCKER_COMPOSE_FILE up -d
197
- - name : Wait for Redis cluster to be ready
198
- run : bundle exec rake wait
199
- - name : Print containers
200
- run : docker compose -f $DOCKER_COMPOSE_FILE ps
201
- - name : Run minitest
202
- run : bundle exec rake test_cluster_broken
203
- - name : Stop containers
204
- run : docker compose -f $DOCKER_COMPOSE_FILE down
205
- cluster-scale :
206
- name : Cluster Scale
207
- timeout-minutes : 15
208
116
strategy :
209
117
fail-fast : false
210
118
matrix :
211
- redis :
212
- - ' 7.0.5'
213
- - ' 6.2.7'
214
- runs-on : ubuntu-latest
119
+ include :
120
+ - {redis: '7.0.5', task: state, compose: compose.replica.yaml, replica: 2, restart: always}
121
+ - {redis: '6.2.7', task: state, compose: compose.replica.yaml, replica: 2, restart: always}
122
+ - {redis: '7.0.5', task: broken, compose: compose.yaml, replica: 1, restart: 'no'}
123
+ - {redis: '6.2.7', task: broken, compose: compose.yaml, replica: 1, restart: 'no'}
124
+ - {redis: '7.0.5', task: scale, compose: compose.scale.yaml, replica: 1, restart: always}
125
+ - {redis: '6.2.7', task: scale, compose: compose.scale.yaml, replica: 1, restart: always}
215
126
env :
216
127
REDIS_VERSION : ${{ matrix.redis }}
217
- DOCKER_COMPOSE_FILE : ' compose.scale.yaml'
128
+ DOCKER_COMPOSE_FILE : ${{ matrix.compose }}
129
+ REDIS_REPLICA_SIZE : ${{ matrix.replica }}
130
+ RESTART_POLICY : ${{ matrix.restart }}
218
131
steps :
219
132
- name : Check out code
220
133
uses : actions/checkout@v3
@@ -232,14 +145,12 @@ jobs:
232
145
- name : Print containers
233
146
run : docker compose -f $DOCKER_COMPOSE_FILE ps
234
147
- name : Run minitest
235
- run : bundle exec rake test_cluster_scale
148
+ run : bundle exec rake test_cluster_${{ matrix.task }}
236
149
- name : Stop containers
237
150
run : docker compose -f $DOCKER_COMPOSE_FILE down
238
151
nat-ted-env :
239
152
name : NAT-ted Environments
240
153
timeout-minutes : 15
241
- strategy :
242
- fail-fast : false
243
154
runs-on : ubuntu-latest
244
155
env :
245
156
REDIS_VERSION : ' 7.0.5'
@@ -298,8 +209,6 @@ jobs:
298
209
benchmark :
299
210
name : Benchmark
300
211
timeout-minutes : 15
301
- strategy :
302
- fail-fast : false
303
212
runs-on : ubuntu-latest
304
213
env :
305
214
REDIS_VERSION : ' 7.0.5'
@@ -360,14 +269,14 @@ jobs:
360
269
memory-profile :
361
270
name : Memory Profile
362
271
timeout-minutes : 15
272
+ runs-on : ubuntu-latest
363
273
strategy :
364
274
fail-fast : false
365
275
matrix :
366
276
mode :
367
277
- single
368
278
- excessive_pipelining
369
279
- pipelining_in_moderation
370
- runs-on : ubuntu-latest
371
280
env :
372
281
REDIS_VERSION : ' 7.0.5'
373
282
DOCKER_COMPOSE_FILE : ' compose.yaml'
0 commit comments