@@ -18,84 +18,42 @@ defaults:
18
18
run :
19
19
shell : bash
20
20
jobs :
21
- lint :
22
- name : Lint
23
- timeout-minutes : 5
24
- runs-on : ubuntu-latest
25
- steps :
26
- - name : Check out code
27
- uses : actions/checkout@v3
28
- - name : Set up Ruby
29
- uses : ruby/setup-ruby@v1
30
- with :
31
- ruby-version : ' 3.2'
32
- bundler-cache : true
33
- - name : Run rubocop
34
- run : bundle exec rubocop
35
21
main :
36
22
name : Main
37
- timeout-minutes : 5
38
- runs-on : ubuntu-latest
39
- strategy :
40
- fail-fast : false
41
- max-parallel : 4
42
- matrix :
43
- redis :
44
- - ' 7.0'
45
- - ' 6.2'
46
- ruby :
47
- - ' 3.2'
48
- driver :
49
- - ' ruby'
50
- - ' hiredis'
51
- docker :
52
- - ' compose.yaml'
53
- - ' compose.ssl.yaml'
54
- env :
55
- REDIS_VERSION : ${{ matrix.redis }}
56
- REDIS_CONNECTION_DRIVER : ${{ matrix.driver }}
57
- DOCKER_COMPOSE_FILE : ${{ matrix.docker }}
58
- steps :
59
- - name : Check out code
60
- uses : actions/checkout@v3
61
- - name : Set up Ruby
62
- uses : ruby/setup-ruby@v1
63
- with :
64
- ruby-version : ${{ matrix.ruby }}
65
- bundler-cache : true
66
- - name : Pull Docker images
67
- run : docker pull redis:$REDIS_VERSION
68
- - name : Run containers
69
- run : docker compose -f $DOCKER_COMPOSE_FILE up -d
70
- - name : Wait for Redis cluster to be ready
71
- run : bundle exec rake wait
72
- - name : Print containers
73
- run : docker compose -f $DOCKER_COMPOSE_FILE ps
74
- - name : Run minitest
75
- run : bundle exec rake test
76
- - name : Stop containers
77
- run : docker compose -f $DOCKER_COMPOSE_FILE down
78
- sub :
79
- name : Sub
80
- timeout-minutes : 5
23
+ timeout-minutes : 10
81
24
runs-on : ubuntu-latest
82
25
strategy :
83
26
fail-fast : false
27
+ max-parallel : 16
84
28
matrix :
85
29
include :
86
- - {redis: '7.0', ruby: '3.2', compose: compose.replica.yaml, replica: 2}
87
- - {redis: '5.0', ruby: '2.7', compose: compose.yaml, replica: 1}
30
+ - {redis: '7.0', ruby: '3.2'}
31
+ - {redis: '7.0', ruby: '3.2', compose: compose.ssl.yaml}
32
+ - {redis: '7.0', ruby: '3.2', driver: 'hiredis'}
33
+ - {redis: '7.0', ruby: '3.2', driver: 'hiredis', compose: compose.ssl.yaml}
34
+ - {redis: '7.0', ruby: '3.2', replica: '2', compose: compose.replica.yaml}
35
+ - {redis: '6.2', ruby: '3.1'}
36
+ - {redis: '6.2', ruby: '3.0'}
37
+ - {redis: '5.0', ruby: '2.7'}
38
+ - {task: test_cluster_state, redis: '7.0', replica: '2', compose: compose.replica.yaml}
39
+ - {task: test_cluster_state, redis: '6.2', replica: '2', compose: compose.replica.yaml}
40
+ - {task: test_cluster_broken, redis: '7.0', restart: 'no'}
41
+ - {task: test_cluster_broken, redis: '6.2', restart: 'no'}
42
+ - {task: test_cluster_scale, redis: '7.0', compose: compose.scale.yaml}
43
+ - {task: test_cluster_scale, redis: '6.2', compose: compose.scale.yaml}
88
44
env :
89
- REDIS_VERSION : ${{ matrix.redis }}
90
- DOCKER_COMPOSE_FILE : ${{ matrix.compose }}
91
- REDIS_REPLICA_SIZE : ${{ matrix.replica }}
45
+ REDIS_VERSION : ${{ matrix.redis || '7.0' }}
46
+ DOCKER_COMPOSE_FILE : ${{ matrix.compose || 'compose.yaml' }}
47
+ REDIS_CONNECTION_DRIVER : ${{ matrix.driver || 'ruby' }}
48
+ REDIS_REPLICA_SIZE : ${{ matrix.replica || '1' }}
49
+ RESTART_POLICY : ${{ matrix.restart || 'always' }}
92
50
steps :
93
51
- name : Check out code
94
52
uses : actions/checkout@v3
95
53
- name : Set up Ruby
96
54
uses : ruby/setup-ruby@v1
97
55
with :
98
- ruby-version : ${{ matrix.ruby }}
56
+ ruby-version : ${{ matrix.ruby || '3.2' }}
99
57
bundler-cache : true
100
58
- name : Pull Docker images
101
59
run : docker pull redis:$REDIS_VERSION
@@ -106,51 +64,12 @@ jobs:
106
64
- name : Print containers
107
65
run : docker compose -f $DOCKER_COMPOSE_FILE ps
108
66
- name : Run minitest
109
- run : bundle exec rake test
110
- - name : Stop containers
111
- run : docker compose -f $DOCKER_COMPOSE_FILE down
112
- cluster-health :
113
- name : Cluster Health
114
- timeout-minutes : 15
115
- runs-on : ubuntu-latest
116
- strategy :
117
- fail-fast : false
118
- matrix :
119
- include :
120
- - {redis: '7.0', task: state, compose: compose.replica.yaml, replica: 2, restart: always}
121
- - {redis: '6.2', task: state, compose: compose.replica.yaml, replica: 2, restart: always}
122
- - {redis: '7.0', task: broken, compose: compose.yaml, replica: 1, restart: 'no'}
123
- - {redis: '6.2', task: broken, compose: compose.yaml, replica: 1, restart: 'no'}
124
- - {redis: '7.0', task: scale, compose: compose.scale.yaml, replica: 1, restart: always}
125
- - {redis: '6.2', task: scale, compose: compose.scale.yaml, replica: 1, restart: always}
126
- env :
127
- REDIS_VERSION : ${{ matrix.redis }}
128
- DOCKER_COMPOSE_FILE : ${{ matrix.compose }}
129
- REDIS_REPLICA_SIZE : ${{ matrix.replica }}
130
- RESTART_POLICY : ${{ matrix.restart }}
131
- steps :
132
- - name : Check out code
133
- uses : actions/checkout@v3
134
- - name : Set up Ruby
135
- uses : ruby/setup-ruby@v1
136
- with :
137
- ruby-version : ' 3.2'
138
- bundler-cache : true
139
- - name : Pull Docker images
140
- run : docker pull redis:$REDIS_VERSION
141
- - name : Run containers
142
- run : docker compose -f $DOCKER_COMPOSE_FILE up -d
143
- - name : Wait for Redis cluster to be ready
144
- run : bundle exec rake wait
145
- - name : Print containers
146
- run : docker compose -f $DOCKER_COMPOSE_FILE ps
147
- - name : Run minitest
148
- run : bundle exec rake test_cluster_${{ matrix.task }}
67
+ run : bundle exec rake ${{ matrix.task || 'test' }}
149
68
- name : Stop containers
150
69
run : docker compose -f $DOCKER_COMPOSE_FILE down
151
70
nat-ted-env :
152
71
name : NAT-ted Environments
153
- timeout-minutes : 15
72
+ timeout-minutes : 5
154
73
runs-on : ubuntu-latest
155
74
env :
156
75
REDIS_VERSION : ' 7.0'
@@ -206,9 +125,23 @@ jobs:
206
125
run : bundle exec rake test
207
126
- name : Stop containers
208
127
run : docker compose -f $DOCKER_COMPOSE_FILE down
128
+ lint :
129
+ name : Lint
130
+ timeout-minutes : 5
131
+ runs-on : ubuntu-latest
132
+ steps :
133
+ - name : Check out code
134
+ uses : actions/checkout@v3
135
+ - name : Set up Ruby
136
+ uses : ruby/setup-ruby@v1
137
+ with :
138
+ ruby-version : ' 3.2'
139
+ bundler-cache : true
140
+ - name : Run rubocop
141
+ run : bundle exec rubocop
209
142
benchmark :
210
143
name : Benchmark
211
- timeout-minutes : 15
144
+ timeout-minutes : 10
212
145
runs-on : ubuntu-latest
213
146
env :
214
147
REDIS_VERSION : ' 7.0'
@@ -235,7 +168,7 @@ jobs:
235
168
- name : Rebuild cluster for balancing of replicas
236
169
run : bundle exec rake build_cluster_for_bench
237
170
env :
238
- DEBUG : " 1 "
171
+ DEBUG : ' 1 '
239
172
- name : Print topology
240
173
run : |
241
174
for i in {1..9}
@@ -266,9 +199,9 @@ jobs:
266
199
done
267
200
- name : Stop containers
268
201
run : docker compose -f $DOCKER_COMPOSE_FILE down
269
- memory-profile :
270
- name : Memory Profile
271
- timeout-minutes : 15
202
+ profiling :
203
+ name : Profiling
204
+ timeout-minutes : 5
272
205
runs-on : ubuntu-latest
273
206
strategy :
274
207
fail-fast : false
0 commit comments