Skip to content

Commit 6dd05b2

Browse files
committed
Run integration tests on semaphore
1 parent eb30bde commit 6dd05b2

File tree

2 files changed

+30
-23
lines changed

2 files changed

+30
-23
lines changed

.semaphore/semaphore.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,12 @@ blocks:
9797
- name: "Test"
9898
commands:
9999
- make test
100+
- name: "Promisified Tests"
101+
commands:
102+
- '[[ -z $DOCKERHUB_APIKEY ]] || docker login --username $DOCKERHUB_USER --password $DOCKERHUB_APIKEY'
103+
- docker compose up -d && sleep 30
104+
- docker ps
105+
- npx jest --forceExit --no-colors --ci test/promisified/producer/
100106
- name: "ESLint"
101107
commands:
102108
- npx eslint lib/kafkajs

docker-compose.yml

Lines changed: 24 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,24 @@
1-
---
2-
zookeeper:
3-
image: confluentinc/cp-zookeeper
4-
ports:
5-
- "2181:2181"
6-
environment:
7-
ZOOKEEPER_CLIENT_PORT: 2181
8-
ZOOKEEPER_TICK_TIME: 2000
9-
kafka:
10-
image: confluentinc/cp-kafka
11-
links:
12-
- zookeeper
13-
ports:
14-
- "9092:9092"
15-
environment:
16-
KAFKA_BROKER_ID: 1
17-
KAFKA_ZOOKEEPER_CONNECT: 'zookeeper:2181'
18-
KAFKA_ADVERTISED_LISTENERS: 'PLAINTEXT://localhost:9092'
19-
KAFKA_OFFSETS_TOPIC_REPLICATION_FACTOR: 1
20-
KAFKA_GROUP_INITIAL_REBALANCE_DELAY_MS: 0
21-
KAFKA_TRANSACTION_STATE_LOG_REPLICATION_FACTOR: 1
22-
KAFKA_DEFAULT_REPLICATION_FACTOR: 1
23-
KAFKA_TRANSACTION_STATE_LOG_MIN_ISR: 1
1+
version: '3'
2+
services:
3+
zookeeper:
4+
image: confluentinc/cp-zookeeper
5+
environment:
6+
ZOOKEEPER_CLIENT_PORT: 2181
7+
kafka:
8+
image: confluentinc/cp-kafka
9+
restart: always
10+
depends_on:
11+
- zookeeper
12+
ports:
13+
- 9092:9092
14+
environment:
15+
KAFKA_BROKER_ID: 0
16+
KAFKA_LISTENER_SECURITY_PROTOCOL_MAP: PLAINTEXT_HOST:PLAINTEXT
17+
KAFKA_ADVERTISED_LISTENERS: PLAINTEXT_HOST://localhost:9092
18+
KAFKA_INTER_BROKER_LISTENER_NAME: PLAINTEXT_HOST
19+
KAFKA_SASL_ENABLED_MECHANISMS: PLAIN
20+
KAFKA_ZOOKEEPER_CONNECT: zookeeper:2181
21+
KAFKA_ZOOKEEPER_CONNECTION_TIMEOUT_MS: 18000
22+
KAFKA_OFFSETS_TOPIC_REPLICATION_FACTOR: 1
23+
KAFKA_TRANSACTION_STATE_LOG_REPLICATION_FACTOR: 1
24+
KAFKA_TRANSACTION_STATE_LOG_MIN_ISR: 1

0 commit comments

Comments
 (0)