Skip to content
This repository was archived by the owner on Jan 6, 2025. It is now read-only.

add ci tests

add ci tests #1

Workflow file for this run

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
# Wait for ClickHouse to be ready
- name: Wait for ClickHouse service
run: |
for i in {1..30}; do
if clickhouse-client --query "SELECT 1"; then
echo "ClickHouse is ready"
exit 0
fi
echo "Waiting for ClickHouse to be ready..."
sleep 2
done
echo "ClickHouse did not become ready in time" && exit 1
- name: Run tests
env:
CLICKHOUSE_HOST: "localhost"
CLICKHOUSE_PORT: "8123"
CLICKHOUSE_USER: "default"
CLICKHOUSE_PASSWORD: ""
run: |
uv run pytest tests
- name: Lint with Ruff
run: ruff check .