-
Notifications
You must be signed in to change notification settings - Fork 1
72 lines (68 loc) · 2.27 KB
/
ci.yml
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
name: ci
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
permissions:
contents: read
jobs:
tests:
name: test
runs-on: ubuntu-latest
services:
zookeeper:
image: confluentinc/cp-zookeeper:7.4.0
ports:
- "2181:2181"
- "2888:2888"
- "3888:3888"
env:
ZOOKEEPER_SERVER_ID: 1
ZOOKEEPER_CLIENT_PORT: 2181
ZOOKEEPER_TICK_TIME: 2000
ZOOKEEPER_INIT_LIMIT: 5
ZOOKEEPER_SYNC_LIMIT: 2
ZOOKEEPER_SERVERS: zookeeper:2888:3888
kafka1:
image: confluentinc/cp-kafka:7.4.0
ports:
- "19092:9092"
env:
KAFKA_ZOOKEEPER_CONNECT: zookeeper:2181
ZOOKEEPER: zookeeper:2181
BOOTSTRAP_SERVERS: kafka1:9091,kafka2:9091,kafka3:9091
KAFKA_ADVERTISED_LISTENERS: INTERNAL://kafka1:9091,EXTERNAL_PLAIN://kafka1:9092
KAFKA_LISTENER_SECURITY_PROTOCOL_MAP: INTERNAL:PLAINTEXT,EXTERNAL_PLAIN:PLAINTEXT
KAFKA_INTER_BROKER_LISTENER_NAME: INTERNAL
kafka2:
image: confluentinc/cp-kafka:7.4.0
ports:
- "29092:9092"
env:
KAFKA_ZOOKEEPER_CONNECT: zookeeper:2181
ZOOKEEPER: zookeeper:2181
BOOTSTRAP_SERVERS: kafka1:9091,kafka2:9091,kafka3:9091
KAFKA_ADVERTISED_LISTENERS: INTERNAL://kafka2:9091,EXTERNAL_PLAIN://kafka2:9092
KAFKA_LISTENER_SECURITY_PROTOCOL_MAP: INTERNAL:PLAINTEXT,EXTERNAL_PLAIN:PLAINTEXT
KAFKA_INTER_BROKER_LISTENER_NAME: INTERNAL
kafka3:
image: confluentinc/cp-kafka:7.4.0
ports:
- "39092:9092"
env:
KAFKA_ZOOKEEPER_CONNECT: zookeeper:2181
ZOOKEEPER: zookeeper:2181
BOOTSTRAP_SERVERS: kafka1:9091,kafka2:9091,kafka3:9091
KAFKA_ADVERTISED_LISTENERS: INTERNAL://kafka3:9091,EXTERNAL_PLAIN://kafka3:9092
KAFKA_LISTENER_SECURITY_PROTOCOL_MAP: INTERNAL:PLAINTEXT,EXTERNAL_PLAIN:PLAINTEXT
KAFKA_INTER_BROKER_LISTENER_NAME: INTERNAL
steps:
- uses: actions/checkout@v3
- uses: erlef/setup-beam@v1
with:
elixir-version: '1.14.5'
otp-version: '26.0'
- run: mix deps.get
- run: mix compile --warning-as-errors
- run: mix test