From ba79d72ccbfd0be8607fd52802962f9440d2e1d5 Mon Sep 17 00:00:00 2001 From: teckick Date: Thu, 30 Mar 2023 23:47:51 +0800 Subject: [PATCH] add dragonfly memcached test --- .../service_test_dragonfly_memcached.yml | 70 +++++++++++++++++++ ...y.yml => service_test_dragonfly_redis.yml} | 2 +- 2 files changed, 71 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/service_test_dragonfly_memcached.yml rename .github/workflows/{service_test_dragonfly.yml => service_test_dragonfly_redis.yml} (96%) diff --git a/.github/workflows/service_test_dragonfly_memcached.yml b/.github/workflows/service_test_dragonfly_memcached.yml new file mode 100644 index 000000000000..d556e67c6330 --- /dev/null +++ b/.github/workflows/service_test_dragonfly_memcached.yml @@ -0,0 +1,70 @@ +# 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: Service Test Dragonfly Memcached + +on: + push: + branches: + - main + pull_request: + branches: + - main + paths: + - "core/src/**" + - "core/tests/**" + - "!core/src/docs/**" + - "!core/src/services/**" + - "core/src/services/memcached/**" + - ".github/workflows/service_test_dragonfly_memcached.yml" + +concurrency: + group: ${{ github.workflow }}-${{ github.ref }}-${{ github.event_name }} + cancel-in-progress: true + +jobs: + memcached: + runs-on: ubuntu-latest + + # Setup memcached server + services: + memcached: + image: docker.dragonflydb.io/dragonflydb/dragonfly + env: + # memcache's max item size is 1MiB, But opendal's behavior tests + # will produce larger file. + # + # Specify the setting here to make our test happy. + # MEMCACHED_MAX_ITEM_SIZE: 16777216 + ports: + - 11211:11211 + options: --memcache_port 12111 + + steps: + - uses: actions/checkout@v3 + - name: Setup Rust toolchain + uses: ./.github/actions/setup + - name: Test + shell: bash + working-directory: core + run: cargo test memcached --features services-memcached -- --show-output + env: + RUST_BACKTRACE: full + RUST_LOG: debug + OPENDAL_MEMCACHED_TEST: on + OPENDAL_MEMCACHED_ENDPOINT: tcp://127.0.0.1:11211 + OPENDAL_MEMCACHED_ROOT: / diff --git a/.github/workflows/service_test_dragonfly.yml b/.github/workflows/service_test_dragonfly_redis.yml similarity index 96% rename from .github/workflows/service_test_dragonfly.yml rename to .github/workflows/service_test_dragonfly_redis.yml index 039768107c48..53d6dae873de 100644 --- a/.github/workflows/service_test_dragonfly.yml +++ b/.github/workflows/service_test_dragonfly_redis.yml @@ -30,7 +30,7 @@ on: - "!core/src/docs/**" - "!core/src/services/**" - "core/src/services/redis/**" - - ".github/workflows/service_test_dragonfly.yml" + - ".github/workflows/service_test_dragonfly_redis.yml" concurrency: group: ${{ github.workflow }}-${{ github.ref }}-${{ github.event_name }}