Skip to content

Commit

Permalink
Use github actions instead of circleci
Browse files Browse the repository at this point in the history
The admin tests were also disabled because the kafkacat shell command was
returning the empty string and causing tests to fail. The admin functionality
is not publicly facing yet and the kafkacat dep should be removed from the
tests anyhow.

Existing consumer tests were also updated to print stdout/stderr for debugging.

Signed-off-by: Sahil Kang <[email protected]>
  • Loading branch information
SahilKang committed Nov 25, 2024
1 parent cd47e1a commit 378a6cc
Show file tree
Hide file tree
Showing 6 changed files with 35 additions and 27 deletions.
21 changes: 0 additions & 21 deletions .circleci/config.yml

This file was deleted.

17 changes: 17 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
name: CI

on:
push:
pull_request:
branches: [ master ]

jobs:
test:
runs-on: ubuntu-latest
steps:
- name: checkout
uses: actions/checkout@v4
- name: docker compose
run: |
docker compose -f ./test/docker-compose.test.yml \
up --build --abort-on-container-exit test
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Copyright (C) 2018-2020 Sahil Kang <[email protected]>
Copyright 2022-2023 Google LLC
Copyright 2022-2024 Google LLC

All parts of cl-rdkafka are licensed under the GNU GPLv3 as detailed below.

Expand Down
3 changes: 3 additions & 0 deletions cl-rdkafka.asd
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
;;; Copyright (C) 2018-2020 Sahil Kang <[email protected]>
;;; Copyright 2024 Google LLC
;;;
;;; This file is part of cl-rdkafka.
;;;
Expand Down Expand Up @@ -92,6 +93,8 @@
((:file "consumer")
(:file "producer")
(:file "produce-consume")
;; TODO Re-enable admin tests after kafkacat/sed dep is removed.
#+nil
(:file "admin")
(:file "headers")
(:file "transactions")))))
14 changes: 10 additions & 4 deletions test/high-level/consumer.lisp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
;;; Copyright (C) 2018-2020 Sahil Kang <[email protected]>
;;; Copyright 2022 Google LLC
;;; Copyright 2022, 2024 Google LLC
;;;
;;; This file is part of cl-rdkafka.
;;;
Expand Down Expand Up @@ -55,7 +55,9 @@
(reduce (lambda (agg s) (format nil "~A|~A" agg s)) expected)
*bootstrap-servers*
topic)
:force-shell t)
:force-shell t
:output t
:error-output :output)
(sleep 2)

(kf:subscribe consumer (list topic))
Expand All @@ -80,7 +82,9 @@
(reduce (lambda (agg s) (format nil "~A|~A" agg s)) expected)
*bootstrap-servers*
topic)
:force-shell t)
:force-shell t
:output t
:error-output :output)
(sleep 2)
(kf:subscribe consumer topic)
(sleep 5)
Expand Down Expand Up @@ -125,7 +129,9 @@
(format nil "echo -n 'Live|Laugh|Hack' | kafkacat -P -D '|' -b '~A' -t '~A'"
*bootstrap-servers*
topic)
:force-shell t)
:force-shell t
:output t
:error-output :output)
(sleep 2)

(kf:subscribe consumer (list topic))
Expand Down
5 changes: 4 additions & 1 deletion test/low-level/consumer.lisp
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
;;; Copyright (C) 2018-2020 Sahil Kang <[email protected]>
;;; Copyright 2024 Google LLC
;;;
;;; This file is part of cl-rdkafka.
;;;
Expand Down Expand Up @@ -113,7 +114,9 @@
(reduce (lambda (agg s) (format nil "~A|~A" agg s)) messages)
bootstrap-servers
topic)
:force-shell t))
:force-shell t
:output t
:error-output :output))


(test consumer
Expand Down

0 comments on commit 378a6cc

Please sign in to comment.