Skip to content

Commit

Permalink
Make CI more robust
Browse files Browse the repository at this point in the history
  • Loading branch information
cressie176 committed Nov 28, 2023
1 parent 4791f2d commit 8d27214
Showing 1 changed file with 15 additions and 2 deletions.
17 changes: 15 additions & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,13 @@ jobs:
runs-on: ubuntu-latest
services:
rabbitmq:
image: rabbitmq
image: rabbitmq:3.12-alpine
ports:
- 5672:5672

strategy:
matrix:
node-version: [10.x, 12.x, 14.x, 16.x, 18.x]
node-version: [10.x, 12.x, 14.x, 16.x, 18.x, 20.x]
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/

steps:
Expand All @@ -34,5 +34,18 @@ jobs:
# Install all prerequisites
- run: npm ci

# Ensure RabbitMQ is available before continuing
- run: |
n=0
while :
do
sleep 5
echo 'HELO\n\n\n\n' | nc localhost 5672 | grep AMQP
[[ $? = 0 ]] && break || ((n++))
(( n >= 5 )) && break
done
- run: echo 'HELO\n\n\n\n' | nc localhost 5672 | grep AMQP

# Run the tests
- run: make test

0 comments on commit 8d27214

Please sign in to comment.