explicitly set interface based on secure value #167
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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" |