Skip to content

217 fix super stream consumer property #715

217 fix super stream consumer property

217 fix super stream consumer property #715

Workflow file for this run

# 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-latest
strategy:
matrix:
node-version: [18.x, 20.x]
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/
services:
rabbitmq:
image: rabbitmq:3.13-rc-management
options: --hostname test-node --name test-node
env:
RABBITMQ_DEFAULT_USER: "test-user"
RABBITMQ_DEFAULT_PASS: "test-password"
volumes:
# these directories will be empty until checkout, but they will be
# populated by the time we restart the service
- ${{ github.workspace }}/conf:/etc/rabbitmq
- ${{ github.workspace }}/certs:/certs
ports:
- 5552:5552
- 5551:5551
- 5672:5672
- 15672:15672
- 1883:1883
- 61613:61613
steps:
- name: Add the rabbitmq service to /etc/hosts
run: sudo echo "127.0.0.1 test-node" | sudo tee -a /etc/hosts
- uses: actions/checkout@v3
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
cache: "npm"
- name: Generate certificates
env:
CN: test-node
run: |
git clone https://github.com/rabbitmq/tls-gen tls-gen
cd tls-gen/basic
make
cd ../..
cp -a tls-gen/basic/result certs/
sudo chown -R 999:999 certs
sudo mv certs/server_test-node_certificate.pem certs/server_rabbitmq_certificate.pem
sudo mv certs/server_test-node_key.pem certs/server_rabbitmq_key.pem
- name: Restart RabbitMQ
run: |
docker restart test-node
sleep 2
docker exec test-node rabbitmqctl await_startup
- name: Create SuperStream
run: docker exec test-node rabbitmq-streams add_super_stream super-stream-test --partitions 2
- run: npm ci
- run: npm run check
- run: npm run build --if-present
- run: |
docker exec test-node rabbitmqctl add_user 'O=client,CN=test-node' ''
docker exec test-node rabbitmqctl clear_password 'O=client,CN=test-node'
docker exec test-node rabbitmqctl set_permissions 'O=client,CN=test-node' '.*' '.*' '.*'
- run: npm test
env:
RABBITMQ_USER: "test-user"
RABBITMQ_PASSWORD: "test-password"
RABBIT_MQ_TEST_NODES: "test-node:5552"
# - run: cd example && npm install && npm start
# env:
# RABBITMQ_USER: "test-user"
# RABBITMQ_PASSWORD: "test-password"
# - run: cd performance_test && npm install && npm run perftest 100000
# env:
# RABBITMQ_USER: "test-user"
# RABBITMQ_PASSWORD: "test-password"