Skip to content

Fixed github action issue #4

Fixed github action issue

Fixed github action issue #4

Workflow file for this run

name: Tests
on:
push:
branches:
- "*"
jobs:
build:
runs-on: ubuntu-latest
services:
broker:
image: apache/kafka:latest
ports:
- 9092:9092
options: >
--env KAFKA_NODE_ID=1
--env KAFKA_PROCESS_ROLES=broker,controller
--env KAFKA_LISTENERS=PLAINTEXT://:9092,CONTROLLER://:9093
--env KAFKA_ADVERTISED_LISTENERS=PLAINTEXT://localhost:9092
--env KAFKA_CONTROLLER_LISTENER_NAMES=CONTROLLER
--env KAFKA_LISTENER_SECURITY_PROTOCOL_MAP=CONTROLLER:PLAINTEXT,PLAINTEXT:PLAINTEXT
--env KAFKA_CONTROLLER_QUORUM_VOTERS=1@localhost:9093
--env KAFKA_OFFSETS_TOPIC_REPLICATION_FACTOR=1
--env KAFKA_TRANSACTION_STATE_LOG_REPLICATION_FACTOR=1
--env KAFKA_TRANSACTION_STATE_LOG_MIN_ISR=1
--env KAFKA_GROUP_INITIAL_REBALANCE_DELAY_MS=0
--env KAFKA_NUM_PARTITIONS=3
steps:
- name: Create topics
run: |
docker exec broker /opt/kafka/bin/kafka-topics.sh --create --topic topic-one --bootstrap-server localhost:9092 --replication-factor 1 --partitions 3;
docker exec broker /opt/kafka/bin/kafka-topics.sh --create --topic topic-two --bootstrap-server localhost:9092 --replication-factor 1 --partitions 1;
docker exec broker /opt/kafka/bin/kafka-topics.sh --create --topic topic-three --bootstrap-server localhost:9092 --replication-factor 1 --partitions 1;
- name: Checkout code
uses: actions/checkout@v3
- name: Set up Rust
uses: actions-rs/toolchain@v1
with:
toolchain: stable
profile: minimal
- name: Run tests
run: cargo test --verbose