Skip to content

Commit

Permalink
update ci (#65)
Browse files Browse the repository at this point in the history
  • Loading branch information
YangKian authored Jan 16, 2024
1 parent 17bb0bf commit 4d19ab5
Show file tree
Hide file tree
Showing 3 changed files with 67 additions and 3 deletions.
66 changes: 65 additions & 1 deletion .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ jobs:
run:
working-directory: ./examples/java
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3

- name: Set up JDK 11
uses: actions/setup-java@v2
Expand All @@ -73,6 +73,34 @@ jobs:
- run: ./gradlew run

test-kafka-java-examples:
runs-on: ubuntu-latest
defaults:
run:
working-directory: ./kafka-examples/java
steps:
- uses: actions/checkout@v3

- name: Set up JDK 11
uses: actions/setup-java@v2
with:
java-version: "11"
distribution: "adopt"

- name: Validate Gradle wrapper
uses: gradle/wrapper-validation-action@v1

- run: ./gradlew spotlessJavaCheck

- name: Start cluster
run: |
docker compose -f ../../assets/quick-start-kafka-lite.yaml up -d
sleep 5
../../tests/wait_hstream_kafka.sh
sleep 5
- run: ./gradlew run

test-go-examples:
runs-on: ubuntu-latest
defaults:
Expand Down Expand Up @@ -109,6 +137,42 @@ jobs:
- name: test
run: ./hstreamdb-go-examples

test-go-kafka-examples:
runs-on: ubuntu-latest
defaults:
run:
working-directory: ./kafka-examples/go
strategy:
matrix:
go-version: ["1.21"]
steps:
- uses: actions/checkout@v3
with:
submodules: "recursive"

- uses: actions/setup-go@v3
with:
go-version: ${{ matrix.go-version }}

- name: check go fmt
run: |
go fmt ./... && \
git diff-index --exit-code HEAD
- name: check go build
run: |
go build github.com/hstreamdb/hstream-kafka-go-examples
- name: Start cluster
run: |
docker compose -f ../../assets/quick-start-kafka-lite.yaml up -d
sleep 5
../../tests/wait_hstream_kafka.sh
sleep 5
- name: test
run: ./hstream-kafka-go-examples

test-python-examples:
runs-on: ubuntu-latest
steps:
Expand Down
2 changes: 1 addition & 1 deletion assets/quick-start-kafka-lite.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ services:
set -ex
# N.B. "enable-dscp-reflection=false" is required for linux kernel which
# doesn't support dscp reflection, e.g. centos7.
/usr/local/bin/ld-dev-cluster --root /data/store \
/usr/local/bin/ld-dev-cluster -n 3 --root /data/store \
--use-tcp --tcp-host $$(hostname -I | awk '{print $$1}') \
--user-admin-port 6440 \
--param enable-dscp-reflection=false \
Expand Down
2 changes: 1 addition & 1 deletion assets/quick-start-lite.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ services:
set -ex
# N.B. "enable-dscp-reflection=false" is required for linux kernel which
# doesn't support dscp reflection, e.g. centos7.
/usr/local/bin/ld-dev-cluster --root /data/store \
/usr/local/bin/ld-dev-cluster -n 3 --root /data/store \
--use-tcp --tcp-host $$(hostname -I | awk '{print $$1}') \
--user-admin-port 6440 \
--param enable-dscp-reflection=false \
Expand Down

0 comments on commit 4d19ab5

Please sign in to comment.