-
Notifications
You must be signed in to change notification settings - Fork 3
66 lines (61 loc) · 1.88 KB
/
ci.yaml
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
name: CI
on:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
ci:
runs-on: ubuntu-latest
services:
databend:
# image: datafuselabs/databend-query
image: datafuselabs/databend
env:
QUERY_DEFAULT_USER: databend
QUERY_DEFAULT_PASSWORD: databend
MINIO_ENABLED: true
ports:
- 8000:8000
- 9000:9000
# https://github.com/bitnami/containers/issues/4315#issuecomment-1545589060
zookeeper:
image: docker.io/bitnami/zookeeper:3.8
ports:
- 2181:2181
env:
ALLOW_ANONYMOUS_LOGIN: yes
kafka:
image: bitnami/kafka:3.2
ports:
- 9092:9092
options: >-
--health-cmd "kafka-broker-api-versions.sh --version"
--health-interval 10s
--health-timeout 5s
--health-retries 5
env:
KAFKA_ENABLE_KRAFT: no
ALLOW_PLAINTEXT_LISTENER: yes
KAFKA_CFG_ZOOKEEPER_CONNECT: zookeeper:2181
KAFKA_CFG_LISTENERS: PLAINTEXT://:9092,PLAINTEXT_HOST://:29092
KAFKA_CFG_LISTENER_SECURITY_PROTOCOL_MAP: PLAINTEXT:PLAINTEXT,PLAINTEXT_HOST:PLAINTEXT
KAFKA_CFG_ADVERTISED_LISTENERS: PLAINTEXT://127.0.0.1:9092,PLAINTEXT_HOST://127.0.0.1:9092
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Verify Service Running
run: |
sleep 60
cid=$(docker ps -a | grep databend | cut -d' ' -f1)
docker logs ${cid}
cid=$(docker ps -a | grep kafka | cut -d' ' -f1)
docker logs ${cid}
netstat -nlp
curl -v http://localhost:8000/v1/health
- name: Test
env:
TEST_DATABEND_DSN: "http://databend:databend@localhost:8000/default"
TEST_KAFKA_BROKER: "localhost:9092"
run: |
go test -v -p 1 -cover ./...