chore: e2e tests for clickhouse cluster

This commit is contained in:
akvlad
2023-12-08 14:51:08 +02:00
parent d3c617c395
commit 80be759e3a
4 changed files with 2512 additions and 0 deletions

View File

@ -0,0 +1,51 @@
# This workflow will validate qryn using nodejs + clickhouse
name: QRYN CI
on:
push:
branches: [ master, beta ]
paths-ignore:
- '**.md'
- '**.yml'
- '**.yaml'
pull_request:
branches: [ master, beta ]
paths-ignore:
- '**.md'
- '**.yml'
- '**.yaml'
workflow_dispatch:
inputs:
clickhouse_tag:
description: 'Tag for ClickHouse (23.8-alpine)'
required: false
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [18, 16.x, 20]
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/
steps:
- uses: actions/checkout@v4
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4.0.0
with:
node-version: ${{ matrix.node-version }}
cache: 'npm'
- run: npm install
- run: npm run postinstall
- run: git submodule init
- run: git submodule update
- run: docker-compose -f docker/e2e/docker-compose-cluster.yaml up -d
- name: Workflow Telemetry
uses: runforesight/workflow-telemetry-action@v1.8.7
- env:
CLUSTER_NAME: test_cluster_two_shards
CLICKHOUSE_DB: qryn
CLICKHOUSE_TSDB: qryn
INTEGRATION_E2E: 1
CLOKI_EXT_URL: 127.0.0.1:3100
run: node qryn.mjs >/dev/stdout & npm run test --forceExit

1210
docker/e2e/config.xml Normal file

File diff suppressed because it is too large Load Diff

1210
docker/e2e/config2.xml Normal file

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,41 @@
version: '2.1'
networks:
common:
driver: bridge
services:
clickhouse_1:
image: clickhouse/clickhouse-server:23.8
container_name: clickhouse.cloki.deploy
hostname: clickhouse.cloki.deploy
domainname: clickhouse.cloki.deploy
restart: unless-stopped
networks:
common:
aliases:
- "clickhouse_1"
expose:
- "9000"
- "2181"
- "9444"
ports:
- 9000:9000
- 8123:8123
volumes:
- ./config.xml:/etc/clickhouse-server/config.xml
clickhouse_2:
image: clickhouse/clickhouse-server:23.8
container_name: clickhouse2.cloki.deploy
hostname: clickhouse2.cloki.deploy
domainname: clickhouse2.cloki.deploy
restart: unless-stopped
networks:
common:
aliases:
- "clickhouse_2"
expose:
- "9000"
- "2181"
- "9444"
volumes:
- ./config2.xml:/etc/clickhouse-server/config.xml