Skip to content

Commit fa31acb

Browse files
committed
ci(ClickHouse): Run engine-parity harness against a docker-compose ClickHouse
beep boop
1 parent ba16490 commit fa31acb

3 files changed

Lines changed: 25 additions & 7 deletions

File tree

.github/workflows/ci.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@ jobs:
1717
SNOWFLAKE_DATABASE: ${{ secrets.SNOWFLAKE_DATABASE }}
1818
SNOWFLAKE_SCHEMA: ${{ secrets.SNOWFLAKE_SCHEMA }}
1919
SNOWFLAKE_PRIVATE_KEY_PATH: /tmp/snowflake_pk.p8
20+
CLICKHOUSE_HOST: localhost
21+
CLICKHOUSE_PORT: "8123"
2022
steps:
2123
- uses: actions/checkout@v5
2224
with:
@@ -30,6 +32,8 @@ jobs:
3032
run: |
3133
umask 077
3234
printf '%s' "${{ secrets.SNOWFLAKE_PRIVATE_KEY }}" > /tmp/snowflake_pk.p8
35+
- name: Start ClickHouse
36+
run: docker compose up --detach --wait clickhouse
3337
- run: make test
3438
- name: Check Coverage
3539
uses: 5monkeys/cobertura-action@v14

README.md

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -112,13 +112,8 @@ export SNOWFLAKE_ACCOUNT=...
112112
export SNOWFLAKE_USER=...
113113
export SNOWFLAKE_PRIVATE_KEY_PATH=...
114114

115-
# ClickHouse (bring up a local container first)
116-
docker run -d --rm --name clickhouse-parity \
117-
-p 18123:8123 \
118-
-e CLICKHOUSE_SKIP_USER_SETUP=1 \
119-
clickhouse/clickhouse-server:latest
120-
export CLICKHOUSE_HOST=localhost
121-
export CLICKHOUSE_PORT=18123
115+
# ClickHouse — bring up the local container the CI workflow also uses
116+
docker compose up --detach --wait clickhouse
122117

123118
uv run pytest tests/test_engine.py
124119
```

docker-compose.yml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
services:
2+
clickhouse:
3+
image: clickhouse/clickhouse-server:25.5.6
4+
environment:
5+
# Skip the random-password bootstrap. The container is only ever
6+
# reachable from the harness on the same compose network / host
7+
# loopback, so the default `default` user with no password is fine.
8+
CLICKHOUSE_SKIP_USER_SETUP: "1"
9+
ports:
10+
- "8123:8123"
11+
ulimits:
12+
nofile:
13+
soft: 262144
14+
hard: 262144
15+
healthcheck:
16+
test: ["CMD", "wget", "--spider", "-q", "http://localhost:8123/ping"]
17+
interval: 2s
18+
timeout: 2s
19+
retries: 15

0 commit comments

Comments
 (0)