Skip to content

Commit

Permalink
Use rm instead of cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
Anmol Vijaywargiya committed Mar 8, 2021
1 parent 3d91f18 commit 3370f3c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 23 deletions.
17 changes: 0 additions & 17 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,22 +27,6 @@ jobs:
- name: Lein Kibit Check
run: lein kibit

run_tests_with_kafka_1:
runs-on: ubuntu-latest
steps:
- uses: actions/setup-java@v1
with:
java-version: "1.8"
- uses: DeLaGuardo/setup-clojure@master
with:
lein: "2.8.1"
- uses: actions/checkout@v2

- name: Run Tests on Kafka 1.x
run: ./bin/run_tests_in_ci.sh
env:
KAFKA_VERSION: 1

run_tests_with_kafka_2:
runs-on: ubuntu-latest
steps:
Expand Down Expand Up @@ -99,7 +83,6 @@ jobs:
needs:
[
lint_check,
run_tests_with_kafka_1,
run_tests_with_kafka_2,
run_tests_with_kafka_cluster,
calculate_coverage,
Expand Down
12 changes: 6 additions & 6 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -11,22 +11,22 @@ setup:
sleep 10
docker exec ziggurat_kafka /opt/bitnami/kafka/bin/kafka-topics.sh --create --topic $(topic) --partitions 3 --replication-factor 1 --zookeeper ziggurat_zookeeper
docker exec ziggurat_kafka /opt/bitnami/kafka/bin/kafka-topics.sh --create --topic $(another_test_topic) --partitions 3 --replication-factor 1 --zookeeper ziggurat_zookeeper
setup-cluster: cleanup-cluster
test: setup
ZIGGURAT_STREAM_ROUTER_DEFAULT_ORIGIN_TOPIC=$(topic) lein test
docker-compose down

setup-cluster:
rm -rf /tmp/ziggurat_kafka_cluster_data
docker-compose -f docker-compose-cluster.yml down
lein deps
docker-compose -f docker-compose-cluster.yml up -d
sleep 30
# Sleeping for 30s to allow the cluster to come up
docker exec ziggurat_kafka1_1 kafka-topics --create --topic $(topic) --partitions 3 --replication-factor 3 --if-not-exists --zookeeper ziggurat_zookeeper_1
docker exec ziggurat_kafka1_1 kafka-topics --create --topic $(another_test_topic) --partitions 3 --replication-factor 3 --if-not-exists --zookeeper ziggurat_zookeeper_1
test: setup
ZIGGURAT_STREAM_ROUTER_DEFAULT_ORIGIN_TOPIC=$(topic) lein test
docker-compose down
test-cluster: setup-cluster
ZIGGURAT_STREAM_ROUTER_DEFAULT_ORIGIN_TOPIC=$(topic) lein test-cluster
docker-compose -f docker-compose-cluster.yml down
cleanup-cluster
cleanup-cluster:
rm -rf /tmp/ziggurat_kafka_cluster_data
coverage: setup
lein code-coverage
Expand Down

0 comments on commit 3370f3c

Please sign in to comment.