# Test infrastructure for `bun run test` and `bun run verify`, locally and in CI. # Each test script that needs it starts it through scripts/infra-up.ts; `bun run infra:down` removes it. # CHKIT_TEST_PORT (default 8123) moves ClickHouse to another port and its own # project (chkit-test-), so several checkouts can each run a stack. name: chkit-test${CHKIT_TEST_PORT:+-$CHKIT_TEST_PORT} services: clickhouse: image: clickhouse/clickhouse-server:26.3 environment: CLICKHOUSE_PASSWORD: chkit-ci CLICKHOUSE_DEFAULT_ACCESS_MANAGEMENT: 1 CHKIT_TEST_PORT: ${CHKIT_TEST_PORT:-8123} # Same port inside and outside the container: the dictionary test points an # HTTP dictionary source at the server's own CLICKHOUSE_URL. ports: - "${CHKIT_TEST_PORT:-8123}:${CHKIT_TEST_PORT:-8123}" ulimits: nofile: { soft: 262144, hard: 262144 } volumes: - ./clickhouse.xml:/etc/clickhouse-server/config.d/chkit-test.xml:ro - ./clickhouse-port.xml:/etc/clickhouse-server/config.d/chkit-test-port.xml:ro healthcheck: test: [CMD, clickhouse-client, --password, chkit-ci, --query, SELECT 1] interval: 500ms timeout: 5s retries: 120 # ClickHouse reaches it as kafka:9092. Kafka engine tables connect lazily, so # both services boot in parallel. kafka: image: docker.redpanda.com/redpandadata/redpanda:v25.3.1 command: - redpanda - start - --mode=dev-container - --smp=1 - --memory=512M - --kafka-addr=0.0.0.0:9092 - --advertise-kafka-addr=kafka:9092 healthcheck: test: [CMD, rpk, cluster, info] interval: 500ms timeout: 5s retries: 120