diff --git a/.github/services/redis/dragonfly/action.yml b/.github/services/redis/dragonfly/action.yml new file mode 100644 index 000000000000..71e271f5c8a1 --- /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 000000000000..64978bf44aa9 --- /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 fdc4f0fb2bf5..5276f3ff92bf 100644 --- a/.github/workflows/service_test_redis.yml +++ b/.github/workflows/service_test_redis.yml @@ -101,49 +101,3 @@ jobs: OPENDAL_REDIS_PASSWORD: opendal OPENDAL_REDIS_ROOT: /test/opendal OPENDAL_REDIS_DB: 0 - - dragonfly: - runs-on: ubuntu-latest - services: - redis: - image: docker.dragonflydb.io/dragonflydb/dragonfly - ports: - - 6379:6379 - 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 - - 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 000000000000..3eb22e34cee8 --- /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 000000000000..25e55a15f52f --- /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'