-
Notifications
You must be signed in to change notification settings - Fork 499
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(bin/ofs): Add behavior test for ofs (#4373)
* test: ofs * ci: setup ofs behavior test * refactor: use public APIs * fix: make clippy happy * chore: remove unused dep
- Loading branch information
Showing
9 changed files
with
527 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
# 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: Test Ofs | ||
description: 'Test Ofs with given setup and service' | ||
inputs: | ||
setup: | ||
description: "The setup action for test" | ||
service: | ||
description: "The service to test" | ||
feature: | ||
description: "The feature to test" | ||
|
||
runs: | ||
using: "composite" | ||
steps: | ||
- name: Setup | ||
shell: bash | ||
run: | | ||
mkdir -p ./dynamic_test_bin_ofs && | ||
cat <<EOF >./dynamic_test_bin_ofs/action.yml | ||
runs: | ||
using: composite | ||
steps: | ||
- name: Setup Test | ||
uses: ./.github/services/${{ inputs.service }}/${{ inputs.setup }} | ||
- name: Run Test Ofs | ||
shell: bash | ||
working-directory: bin/ofs | ||
run: cargo test --features ${{ inputs.feature }} --no-default-features | ||
env: | ||
OPENDAL_TEST: ${{ inputs.service }} | ||
EOF | ||
- name: Run | ||
uses: ./dynamic_test_bin_ofs |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
# 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: Behavior Test Bin Ofs | ||
|
||
on: | ||
workflow_call: | ||
inputs: | ||
os: | ||
required: true | ||
type: string | ||
cases: | ||
required: true | ||
type: string | ||
|
||
jobs: | ||
test: | ||
name: ${{ matrix.cases.service }} / ${{ matrix.cases.setup }} | ||
runs-on: ${{ inputs.os }} | ||
strategy: | ||
matrix: | ||
cases: ${{ fromJson(inputs.cases) }} | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Setup Rust toolchain | ||
uses: ./.github/actions/setup | ||
with: | ||
need-protoc: true | ||
need-rocksdb: true | ||
github-token: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
# TODO: 1password is only supported on linux | ||
# | ||
# Waiting for https://github.com/1Password/load-secrets-action/issues/46 | ||
- name: Setup 1Password Connect | ||
if: runner.os == 'Linux' | ||
uses: 1password/load-secrets-action/configure@v1 | ||
with: | ||
connect-host: ${{ secrets.OP_CONNECT_HOST }} | ||
connect-token: ${{ secrets.OP_CONNECT_TOKEN }} | ||
|
||
- name: Test Bin Ofs | ||
uses: ./.github/actions/test_behavior_bin_ofs | ||
with: | ||
setup: ${{ matrix.cases.setup }} | ||
service: ${{ matrix.cases.service }} | ||
feature: ${{ matrix.cases.feature }} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Oops, something went wrong.