This is an automated email from the ASF dual-hosted git repository.

suyanhanx pushed a commit to branch redis-external-service-test-planner
in repository https://gitbox.apache.org/repos/asf/incubator-opendal.git

commit b351b5183708dd2a81d206035469c9bad4e8a159
Author: suyanhanx <[email protected]>
AuthorDate: Tue Oct 24 15:38:55 2023 +0800

    refactor(services/redis): migrate to test planner for kvrocks & dragonfly
    
    Signed-off-by: suyanhanx <[email protected]>
---
 .github/services/redis/dragonfly/action.yml | 35 +++++++++++++++++++++++++++++
 .github/services/redis/kvrocks/action.yml   | 35 +++++++++++++++++++++++++++++
 .github/workflows/service_test_redis.yml    | 23 -------------------
 fixtures/redis/docker-compose-dragonfly.yml | 24 ++++++++++++++++++++
 fixtures/redis/docker-compose-kvrocks.yml   | 24 ++++++++++++++++++++
 5 files changed, 118 insertions(+), 23 deletions(-)

diff --git a/.github/services/redis/dragonfly/action.yml 
b/.github/services/redis/dragonfly/action.yml
new file mode 100644
index 000000000..71e271f5c
--- /dev/null
+++ b/.github/services/redis/dragonfly/action.yml
@@ -0,0 +1,35 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+name: dragonfly
+description: 'Behavior test for dragonfly'
+
+runs:
+  using: "composite"
+  steps:
+    - name: Setup Dragonfly Server
+      shell: bash
+      working-directory: fixtures/redis
+      run: docker-compose -f docker-compose-dragonfly.yml up -d
+    - name: Setup
+      shell: bash
+      run: |
+        cat << EOF >> $GITHUB_ENV
+        OPENDAL_REDIS_ENDPOINT=tcp://127.0.0.1:6379
+        OPENDAL_REDIS_ROOT=/
+        OPENDAL_REDIS_DB=0
+        EOF
diff --git a/.github/services/redis/kvrocks/action.yml 
b/.github/services/redis/kvrocks/action.yml
new file mode 100644
index 000000000..64978bf44
--- /dev/null
+++ b/.github/services/redis/kvrocks/action.yml
@@ -0,0 +1,35 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+name: kvrocks
+description: 'Behavior test for kvrocks'
+
+runs:
+  using: "composite"
+  steps:
+    - name: Setup Kvrocks Server
+      shell: bash
+      working-directory: fixtures/redis
+      run: docker-compose -f docker-compose-kvrocks.yml up -d
+    - name: Setup
+      shell: bash
+      run: |
+        cat << EOF >> $GITHUB_ENV
+        OPENDAL_REDIS_ENDPOINT=tcp://127.0.0.1:6379
+        OPENDAL_REDIS_ROOT=/
+        OPENDAL_REDIS_DB=0
+        EOF
diff --git a/.github/workflows/service_test_redis.yml 
b/.github/workflows/service_test_redis.yml
index fdc4f0fb2..6f1612bbe 100644
--- a/.github/workflows/service_test_redis.yml
+++ b/.github/workflows/service_test_redis.yml
@@ -124,26 +124,3 @@ jobs:
           OPENDAL_REDIS_ENDPOINT: tcp://127.0.0.1:6379
           OPENDAL_REDIS_ROOT: /
           OPENDAL_REDIS_DB: 0
-
-  kvrocks:
-    runs-on: ubuntu-latest
-    services:
-      redis:
-        image: apache/kvrocks:2.5.1
-        ports:
-          - 6379:6666
-    steps:
-      - uses: actions/checkout@v4
-      - name: Setup Rust toolchain
-        uses: ./.github/actions/setup
-        with:
-          need-nextest: true
-      - name: Test
-        shell: bash
-        working-directory: core
-        run: cargo nextest run behavior --features services-redis
-        env:
-          OPENDAL_TEST: redis
-          OPENDAL_REDIS_ENDPOINT: tcp://127.0.0.1:6379
-          OPENDAL_REDIS_ROOT: /
-          OPENDAL_REDIS_DB: 0
diff --git a/fixtures/redis/docker-compose-dragonfly.yml 
b/fixtures/redis/docker-compose-dragonfly.yml
new file mode 100644
index 000000000..3eb22e34c
--- /dev/null
+++ b/fixtures/redis/docker-compose-dragonfly.yml
@@ -0,0 +1,24 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+version: '3.8'
+
+services:
+  redis:
+    image: docker.dragonflydb.io/dragonflydb/dragonfly
+    ports:
+      - '6379:6379'
diff --git a/fixtures/redis/docker-compose-kvrocks.yml 
b/fixtures/redis/docker-compose-kvrocks.yml
new file mode 100644
index 000000000..25e55a15f
--- /dev/null
+++ b/fixtures/redis/docker-compose-kvrocks.yml
@@ -0,0 +1,24 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+version: '3.8'
+
+services:
+  redis:
+    image: apache/kvrocks:2.5.1
+    ports:
+      - '6379:6666'

Reply via email to