This is an automated email from the ASF dual-hosted git repository.
xuanwo pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/incubator-opendal.git
The following commit(s) were added to refs/heads/main by this push:
new d983bedb5 refactor(services/sqlite): Migrate sqlite task to new
behavior test planner (#3365)
d983bedb5 is described below
commit d983bedb53f1723fd4ced5e59c4cdf1b2ef301e0
Author: Nadeshiko Manju <[email protected]>
AuthorDate: Tue Oct 24 02:12:36 2023 +0800
refactor(services/sqlite): Migrate sqlite task to new behavior test planner
(#3365)
---
.github/services/sqlite/sqlite/action.yml | 36 +++++++++++++++++
.github/workflows/service_test_sqlite.yml | 65 -------------------------------
bindings/java/Cargo.toml | 2 +
3 files changed, 38 insertions(+), 65 deletions(-)
diff --git a/.github/services/sqlite/sqlite/action.yml
b/.github/services/sqlite/sqlite/action.yml
new file mode 100644
index 000000000..e5d3e6c47
--- /dev/null
+++ b/.github/services/sqlite/sqlite/action.yml
@@ -0,0 +1,36 @@
+# 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: sqlite
+description: 'Behavior test for sqlite'
+
+runs:
+ using: "composite"
+ steps:
+ - name: Setup Sqlite
+ shell: bash
+ working-directory: fixtures/sqlite
+ run: mkdir -p /tmp/opendal && sqlite3 /tmp/opendal/test.db < data.sql
+ - name: Setup
+ shell: bash
+ run: |
+ cat << EOF >> $GITHUB_ENV
+ OPENDAL_SQLITE_CONNECTION_STRING=file:///tmp/opendal/test.db
+ OPENDAL_SQLITE_TABLE=data
+ OPENDAL_SQLITE_KEY_FIELD=key
+ OPENDAL_SQLITE_VALUE_FIELD=data
+ EOF
diff --git a/.github/workflows/service_test_sqlite.yml
b/.github/workflows/service_test_sqlite.yml
deleted file mode 100644
index 0069ccd75..000000000
--- a/.github/workflows/service_test_sqlite.yml
+++ /dev/null
@@ -1,65 +0,0 @@
-# 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 Sqlite
-
-on:
- push:
- branches:
- - main
- pull_request:
- branches:
- - main
- paths:
- - "core/src/**"
- - "core/tests/**"
- - "!core/src/docs/**"
- - "!core/src/services/**"
- - "core/src/services/sqlite/**"
- - ".github/workflows/service_test_sqlite.yml"
- - "fixtures/sqlite/**"
-
-concurrency:
- group: ${{ github.workflow }}-${{ github.ref }}-${{ github.event_name }}
- cancel-in-progress: true
-
-jobs:
- sqlite:
- runs-on: ubuntu-latest
-
- steps:
- - uses: actions/checkout@v4
- - name: Setup Sqlite
- shell: bash
- working-directory: fixtures/sqlite
- run: mkdir -p /tmp/opendal && sqlite3 /tmp/opendal/test.db < data.sql
-
- - 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-sqlite
- env:
- OPENDAL_TEST: sqlite
- OPENDAL_SQLITE_CONNECTION_STRING: file:///tmp/opendal/test.db
- OPENDAL_SQLITE_TABLE: data
- OPENDAL_SQLITE_KEY_FIELD: key
- OPENDAL_SQLITE_VALUE_FIELD: data
diff --git a/bindings/java/Cargo.toml b/bindings/java/Cargo.toml
index 7a6a47920..df1ca7e66 100644
--- a/bindings/java/Cargo.toml
+++ b/bindings/java/Cargo.toml
@@ -81,6 +81,7 @@ services-all = [
"services-vercel-artifacts",
"services-wasabi",
"services-mongodb",
+ "services-sqlite",
]
# Default services provided by opendal.
@@ -127,6 +128,7 @@ services-vercel-artifacts =
["opendal/services-vercel-artifacts"]
services-wasabi = ["opendal/services-wasabi"]
services-mysql = ["opendal/services-mysql"]
services-mongodb = ["opendal/services-mongodb"]
+services-sqlite = ["opendal/services-sqlite"]
[dependencies]
anyhow = "1.0.71"