Skip to content

Commit 7a384a0

Browse files
Update workflows
1 parent f9f2344 commit 7a384a0

File tree

1 file changed

+15
-7
lines changed

1 file changed

+15
-7
lines changed

.github/workflows/test.yml

Lines changed: 15 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,15 @@ on:
99
jobs:
1010
build:
1111
runs-on: ubuntu-latest
12+
strategy:
13+
matrix:
14+
ruby-version:
15+
- "3.4.4"
16+
- "3.3.9"
17+
- "3.2.7"
1218
services:
1319
rabbitmq:
14-
image: rabbitmq:3.9-management
20+
image: rabbitmq:4-management
1521
ports:
1622
- 5672:5672
1723
- 15672:15672
@@ -23,17 +29,17 @@ jobs:
2329
steps:
2430
- name: Checkout Repository
2531
uses: actions/checkout@v2
26-
- name: Wait for Broker to Finish Starting
32+
- name: Wait for RabbitMQ node to finish booting
2733
run: |
2834
set +e
2935
tries=6;
3036
while true; do
31-
$RUBY_RABBITMQ_HTTP_API_CLIENT_RABBITMQCTL eval 'true = rabbit:is_running().'
37+
$RUBY_RABBITMQ_HTTP_API_CLIENT_RABBITMQCTL await_startup
3238
if [[ $? -ne 0 ]]; then
3339
((tries--))
3440
if [[ $tries -gt 0 ]]; then
35-
echo "Rabbit is not yet running, will retry in 10s"
36-
sleep 10
41+
echo "Rabbit is not yet running, will retry in 3s"
42+
sleep 3
3743
else
3844
exit 1
3945
fi
@@ -47,9 +53,11 @@ jobs:
4753
$RUBY_RABBITMQ_HTTP_API_CLIENT_RABBITMQCTL eval 'supervisor2:terminate_child(rabbit_mgmt_sup_sup, rabbit_mgmt_sup), application:set_env(rabbitmq_management, sample_retention_policies, [{global, [{605, 1}]}, {basic, [{605, 1}]}, {detailed, [{10, 1}]}]), rabbit_mgmt_sup_sup:start_child().' || true
4854
$RUBY_RABBITMQ_HTTP_API_CLIENT_RABBITMQCTL eval 'supervisor2:terminate_child(rabbit_mgmt_agent_sup_sup, rabbit_mgmt_agent_sup), application:set_env(rabbitmq_management_agent, sample_retention_policies, [{global, [{605, 1}]}, {basic, [{605, 1}]}, {detailed, [{10, 1}]}]), rabbit_mgmt_agent_sup_sup:start_child().' || true
4955
- uses: ruby/setup-ruby@v1
56+
- name: Set up Ruby ${{ matrix.ruby-version }}
5057
with:
51-
ruby-version: 2.6 # Not needed with a .ruby-version file
52-
bundler-cache: true # runs 'bundle install' and caches installed gems automatically
58+
ruby-version: ${{ matrix.ruby-version }}
59+
- name: Install dependencies
60+
run: bundle install
5361
- name: Run Tests
5462
run: |
5563
bundle exec rspec -cfd spec

0 commit comments

Comments
 (0)