Skip to content

Commit

Permalink
Add rabbitmq healthcheck on CI (#371)
Browse files Browse the repository at this point in the history
  • Loading branch information
balanza authored Jan 23, 2025
1 parent a718585 commit 732771b
Showing 1 changed file with 13 additions and 10 deletions.
23 changes: 13 additions & 10 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -56,16 +56,7 @@ jobs:
test:
runs-on: ubuntu-20.04
env:
RABBITMQ_URL: amqp://guest:guest@localhost:5672

services:
rabbitmq:
image: rabbitmq
env:
RABBITMQ_DEFAULT_USER: guest
RABBITMQ_DEFAULT_PASS: guest
ports:
- 5672:5672
RABBITMQ_URL: amqp://guest:guest@localhost:5675

steps:
- uses: actions/checkout@v4
Expand All @@ -79,6 +70,18 @@ jobs:
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-
- name: "Docker compose dependencies"
uses: isbang/[email protected]
with:
compose-file: "./docker-compose.yaml"
down-flags: "--volumes"
- name: Wait for RabbitMQ
run: |
until timeout 1 bash -c "cat < /dev/null > /dev/tcp/localhost/5675"; do
echo "Waiting for RabbitMQ to be ready..."
sleep 10
done
echo "RabbitMQ is up and running!"
- name: test
run: make test-coverage
- name: install goveralls
Expand Down

0 comments on commit 732771b

Please sign in to comment.