forked from ClickHouse/mcp-clickhouse
-
Notifications
You must be signed in to change notification settings - Fork 0
78 lines (63 loc) · 1.85 KB
/
Copy pathci.yaml
File metadata and controls
78 lines (63 loc) · 1.85 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
name: CI
on:
push:
branches:
- main
pull_request:
jobs:
test:
runs-on: ubuntu-latest
services:
clickhouse:
image: clickhouse/clickhouse-server:24.10
ports:
- 9000:9000
- 8123:8123
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Install uv
uses: astral-sh/setup-uv@v4
- name: Setup Python
run: uv python install 3.13
- name: Install Project
run: uv sync --all-extras --dev
- name: Run tests
env:
CLICKHOUSE_HOST: "localhost"
CLICKHOUSE_PORT: "8123"
CLICKHOUSE_USER: "default"
CLICKHOUSE_PASSWORD: ""
CLICKHOUSE_SECURE: "false"
CLICKHOUSE_VERIFY: "false"
CHDB_ENABLED: "true"
run: |
uv run pytest tests
- name: Lint with Ruff
run: uv run ruff check .
docker-build:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Build Docker image
uses: docker/build-push-action@v5
with:
context: .
push: false
load: true
tags: mcp-clickhouse:test
cache-from: type=gha
cache-to: type=gha,mode=max
- name: Test Docker image import
run: |
docker run --rm mcp-clickhouse:test python -c "import mcp_clickhouse; print('✅ MCP ClickHouse Docker image works!')"
- name: Test Docker image default command
run: |
timeout 10s docker run --rm \
-e CLICKHOUSE_HOST=localhost \
-e CLICKHOUSE_USER=default \
-e CLICKHOUSE_PASSWORD="" \
mcp-clickhouse:test || [ $? = 124 ] && echo "✅ Docker container starts successfully"