Skip to content

Commit

Permalink
Add workflow to test RabbitMQ (#4)
Browse files Browse the repository at this point in the history
* Create node.js.yml

* Update node.js.yml

* Update node.js.yml

* Update node.js.yml

* Update node.js.yml

* Update node.js.yml

* update to use healthcheck

* Update healthcheck
  • Loading branch information
berviantoleo committed Oct 2, 2022
1 parent 155bf05 commit b23dd7c
Showing 1 changed file with 36 additions and 0 deletions.
36 changes: 36 additions & 0 deletions .github/workflows/node.js.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
# This workflow will do a clean installation of node dependencies, cache/restore them, build the source code and run tests across different versions of node
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions

name: Node.js CI

on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
jobs:
build:
runs-on: ubuntu-22.04
services:
rabbitmq:
image: rabbitmq:3.10-alpine
ports:
- 5672:5672
options: >-
--health-cmd "rabbitmq-diagnostics -q ping"
--health-interval 30s
--health-timeout 30s
--health-retries 5
strategy:
matrix:
node-version: [16.x, 18.x]
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/
steps:
- uses: actions/checkout@v3
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
cache: 'yarn'
- run: yarn --frozen-lockfile
- run: RABBITMQ_HOST="amqp://localhost:5672" node sender.js

0 comments on commit b23dd7c

Please sign in to comment.