From e053a5c9afd00495f206bd3afe9dafcbd0d1d623 Mon Sep 17 00:00:00 2001 From: Ryan Gang Date: Thu, 5 Sep 2024 14:48:40 +0530 Subject: [PATCH] ci: install kafka on ci & update your_program --- .github/workflows/test.yml | 7 +++++++ internal/test_helpers/pass_all/your_program.sh | 7 ++----- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 39e2bb9..9d23b73 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -14,6 +14,13 @@ jobs: with: go-version: 1.22.x + - name: Install Kafka + run: | + wget --progress=dot:giga https://dlcdn.apache.org/kafka/3.8.0/kafka_2.13-3.8.0.tgz + tar -xzf kafka_2.13-3.8.0.tgz + sudo mv kafka_2.13-3.8.0/ /usr/local/kafka + export PATH=$PATH:/usr/local/kafka/bin + - name: Set up Python uses: actions/setup-python@v1 with: diff --git a/internal/test_helpers/pass_all/your_program.sh b/internal/test_helpers/pass_all/your_program.sh index 913fd6e..b52ef25 100755 --- a/internal/test_helpers/pass_all/your_program.sh +++ b/internal/test_helpers/pass_all/your_program.sh @@ -1,9 +1,6 @@ #!/bin/sh echo "Starting Kafka using KRaft (Kafka Raft Metadata)" -cd /tmp -rm -rf /tmp/kafka-logs /tmp/zookeeper /tmp/kraft-combined-logs -cd /Users/ryang/Developer/tmp/kafka/kafka_2.13-3.8.0 # For fresh start # KAFKA_CLUSTER_ID="$(./bin/kafka-storage.sh random-uuid)" -# ./bin/kafka-storage.sh format -t $KAFKA_CLUSTER_ID -c config/kraft/server.properties -./bin/kafka-server-start.sh config/kraft/server.properties --override log.dirs=/Users/ryang/Developer/work/course-testers/kafka-tester/internal/test_helpers/pass_all/kraft-combined-logs > /dev/null 2>&1 +# /kafka/bin/kafka-storage.sh format -t $KAFKA_CLUSTER_ID -c config/kraft/server.properties +/usr/local/kafka/bin/kafka-server-start.sh config/kraft/server.properties --override log.dirs=./internal/test_helpers/pass_all/kraft-combined-logs > /dev/null 2>&1