Skip to content

Using a RabbitMQ service to test NPM package #25895

Answered by jpwilliams
jpwilliams asked this question in Actions
Discussion options

You must be logged in to vote

Following @dentarg’s example in actions/example-services#3, I now have it working, so I guess I’ll post this as the solution.

The config that finally seemed to work was using a VM (so not utilising  container > image ) and the following  services  block:

services:
  rabbitmq:
    image: rabbitmq:latest
    ports:
      - 5672/tcp
    options: --health-cmd "rabbitmqctl node_health_check" --health-interval 10s --health-timeout 5s --health-retries 5

Alongside accessing the instance using:

amqp://localhost:${{ job.services.rabbitmq.ports[5672] }}

As mentioned in the issue, I’m not really sure whether this is a meaningful change or whether something was fixed behind the scenes, but it works …

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
1 participant