Skip to content

Commit c9cb355

Browse files
committed
Clickhouse test
1 parent b9a0dfb commit c9cb355

File tree

1 file changed

+44
-1
lines changed

1 file changed

+44
-1
lines changed

.github/workflows/ci.yml

Lines changed: 44 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,8 @@ jobs:
6565
--ignore=tests/test_duckdb.py \
6666
--ignore=tests/test_cockroachdb.py \
6767
--ignore=tests/test_turso.py \
68-
--ignore=tests/test_ssh.py
68+
--ignore=tests/test_ssh.py \
69+
--ignore=tests/test_clickhouse.py
6970
7071
test-sqlite:
7172
runs-on: ubuntu-latest
@@ -400,6 +401,48 @@ jobs:
400401
run: |
401402
pytest tests/test_cockroachdb.py -v --timeout=120
402403
404+
test-clickhouse:
405+
runs-on: ubuntu-latest
406+
needs: build
407+
408+
steps:
409+
- uses: actions/checkout@v4
410+
411+
- name: Set up Python 3.12
412+
uses: actions/setup-python@v5
413+
with:
414+
python-version: "3.12"
415+
416+
- name: Install dependencies
417+
run: |
418+
python -m pip install --upgrade pip
419+
pip install -e ".[test]"
420+
pip install clickhouse-connect
421+
422+
- name: Start ClickHouse
423+
run: |
424+
docker run -d --name clickhouse \
425+
-p 8123:8123 -p 9000:9000 \
426+
clickhouse/clickhouse-server:latest
427+
for i in {1..30}; do
428+
if curl -sf http://localhost:8123/ping > /dev/null 2>&1; then
429+
echo "ClickHouse is ready"
430+
break
431+
fi
432+
echo "Waiting for ClickHouse... ($i/30)"
433+
sleep 2
434+
done
435+
436+
- name: Run ClickHouse integration tests
437+
env:
438+
CLICKHOUSE_HOST: localhost
439+
CLICKHOUSE_PORT: 8123
440+
CLICKHOUSE_USER: default
441+
CLICKHOUSE_PASSWORD: ""
442+
CLICKHOUSE_DATABASE: test_sqlit
443+
run: |
444+
pytest tests/test_clickhouse.py -v --timeout=120
445+
403446
test-ssh:
404447
runs-on: ubuntu-latest
405448
needs: build

0 commit comments

Comments
 (0)