@@ -34,23 +34,23 @@ jobs:
3434 run : bundle exec rubocop
3535 main :
3636 name : Main
37- timeout-minutes : 15
37+ timeout-minutes : 5
38+ runs-on : ubuntu-latest
3839 strategy :
3940 fail-fast : false
41+ max-parallel : 4
4042 matrix :
4143 redis :
4244 - ' 7.0.5'
4345 - ' 6.2.7'
4446 ruby :
4547 - ' 3.2'
46- - ' 2.7'
4748 driver :
4849 - ' ruby'
4950 - ' hiredis'
5051 docker :
5152 - ' compose.yaml'
5253 - ' compose.ssl.yaml'
53- runs-on : ubuntu-latest
5454 env :
5555 REDIS_VERSION : ${{ matrix.redis }}
5656 REDIS_CONNECTION_DRIVER : ${{ matrix.driver }}
@@ -75,86 +75,27 @@ jobs:
7575 run : bundle exec rake test
7676 - name : Stop containers
7777 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
8381 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
14082 strategy :
14183 fail-fast : false
14284 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}
14788 env :
14889 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 }}
15192 steps :
15293 - name : Check out code
15394 uses : actions/checkout@v3
15495 - name : Set up Ruby
15596 uses : ruby/setup-ruby@v1
15697 with :
157- ruby-version : ' 3.2 '
98+ ruby-version : ${{ matrix.ruby }}
15899 bundler-cache : true
159100 - name : Pull Docker images
160101 run : docker pull redis:$REDIS_VERSION
@@ -165,56 +106,28 @@ jobs:
165106 - name : Print containers
166107 run : docker compose -f $DOCKER_COMPOSE_FILE ps
167108 - name : Run minitest
168- run : bundle exec rake test_cluster_state
109+ run : bundle exec rake test
169110 - name : Stop containers
170111 run : docker compose -f $DOCKER_COMPOSE_FILE down
171- cluster-broken :
172- name : Cluster Broken
112+ cluster-health :
113+ name : Cluster Health
173114 timeout-minutes : 15
174- strategy :
175- fail-fast : false
176- matrix :
177- redis :
178- - ' 7.0.5'
179- - ' 6.2.7'
180115 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
208116 strategy :
209117 fail-fast : false
210118 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}
215126 env :
216127 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 }}
218131 steps :
219132 - name : Check out code
220133 uses : actions/checkout@v3
@@ -232,14 +145,12 @@ jobs:
232145 - name : Print containers
233146 run : docker compose -f $DOCKER_COMPOSE_FILE ps
234147 - name : Run minitest
235- run : bundle exec rake test_cluster_scale
148+ run : bundle exec rake test_cluster_${{ matrix.task }}
236149 - name : Stop containers
237150 run : docker compose -f $DOCKER_COMPOSE_FILE down
238151 nat-ted-env :
239152 name : NAT-ted Environments
240153 timeout-minutes : 15
241- strategy :
242- fail-fast : false
243154 runs-on : ubuntu-latest
244155 env :
245156 REDIS_VERSION : ' 7.0.5'
@@ -298,8 +209,6 @@ jobs:
298209 benchmark :
299210 name : Benchmark
300211 timeout-minutes : 15
301- strategy :
302- fail-fast : false
303212 runs-on : ubuntu-latest
304213 env :
305214 REDIS_VERSION : ' 7.0.5'
@@ -360,14 +269,14 @@ jobs:
360269 memory-profile :
361270 name : Memory Profile
362271 timeout-minutes : 15
272+ runs-on : ubuntu-latest
363273 strategy :
364274 fail-fast : false
365275 matrix :
366276 mode :
367277 - single
368278 - excessive_pipelining
369279 - pipelining_in_moderation
370- runs-on : ubuntu-latest
371280 env :
372281 REDIS_VERSION : ' 7.0.5'
373282 DOCKER_COMPOSE_FILE : ' compose.yaml'
0 commit comments