Skip to content

Commit

Permalink
Update ClickHouse Docker setup and test workflow
Browse files Browse the repository at this point in the history
Signed-off-by: Marcel Coetzee <[email protected]>
  • Loading branch information
Pipboyguy committed Jun 27, 2024
1 parent f077346 commit 6e44a71
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 6 deletions.
8 changes: 6 additions & 2 deletions .github/clickhouse-compose.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
---
version: '3'

services:
clickhouse:
image: clickhouse/clickhouse-server
Expand All @@ -16,6 +14,12 @@ services:
- clickhouse_data:/var/lib/clickhouse/
- clickhouse_logs:/var/log/clickhouse-server/
restart: unless-stopped
healthcheck:
test: [ "CMD", "wget", "--no-verbose", "--tries=1", "--spider", "http://localhost:8123/ping" ]
interval: 3s
timeout: 5s
retries: 5


volumes:
clickhouse_data:
Expand Down
12 changes: 8 additions & 4 deletions .github/workflows/test_destination_clickhouse.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

name: test | clickhouse

on:
Expand All @@ -8,7 +7,7 @@ on:
- devel
workflow_dispatch:
schedule:
- cron: '0 2 * * *'
- cron: '0 2 * * *'

concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
Expand Down Expand Up @@ -77,8 +76,13 @@ jobs:
name: Run all tests Linux
if: ${{ contains(github.event.pull_request.labels.*.name, 'ci full') || github.event_name == 'schedule'}}
- name: Start ClickHouse
run: docker-compose -f ".github/clickhouse-compose.yml" up -d
- run: |
docker-compose -f ".github/clickhouse-compose.yml" up -d
echo "Waiting for ClickHouse to be healthy..."
timeout 30s bash -c 'until docker-compose -f ".github/clickhouse-compose.yml" ps | grep -q "healthy"; do sleep 1; done'
echo "ClickHouse is up and running"
name: Start ClickHouse
- run: poetry run pytest tests/load && poetry run pytest tests/cli
name: Run all local tests Linux
Expand Down

0 comments on commit 6e44a71

Please sign in to comment.