Skip to content

Fix test.yml key ordering #17

Fix test.yml key ordering

Fix test.yml key ordering #17

Workflow file for this run

name: Test

Check failure on line 1 in .github/workflows/test.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/test.yml

Invalid workflow file

(Line: 55, Col: 9): There's not enough info to determine what you meant. Add one of these properties: run, shell, uses, with, working-directory
on:
push:
#! branches:
#! - master
#! pull_request:
#! branches:
#! - master
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
ruby-version:
- "3.4.4"
- "3.3.9"
- "3.2.7"
services:
rabbitmq:
image: rabbitmq:4-management
ports:
- 5672:5672
- 15672:15672
options: >-
--name rabbitmq
env:
RUBY_RABBITMQ_HTTP_API_CLIENT_RABBITMQCTL: docker exec rabbitmq rabbitmqctl
RUBY_RABBITMQ_HTTP_API_CLIENT_RABBITMQ_PLUGINS: docker exec rabbitmq rabbitmq-plugins
steps:
- name: Checkout Repository
uses: actions/checkout@v2
- name: Wait for RabbitMQ node to finish booting
run: |
set +e
tries=6;
while true; do
$RUBY_RABBITMQ_HTTP_API_CLIENT_RABBITMQCTL await_startup
if [[ $? -ne 0 ]]; then
((tries--))
if [[ $tries -gt 0 ]]; then
echo "Rabbit is not yet running, will retry in 3s"
sleep 3
else
exit 1
fi
else
exit 0
fi
done
- name: Configure Broker for Test Suite
run: |
# Reduce retention policy for faster publishing of stats
$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
$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
- name: Set up Ruby ${{ matrix.ruby-version }}
- uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby-version }}
- name: Install dependencies
run: bundle install
- name: Run Tests
run: |
bundle exec rspec -cfd spec