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/opendal.git
The following commit(s) were added to refs/heads/main by this push:
new 6171750e5b ci: scope 1Password Connect env to core behavior fixture
setup (#9060)
6171750e5b is described below
commit 6171750e5b312269d204ddc6540ca32250aca197
Author: Xuanwo <[email protected]>
AuthorDate: Wed Nov 25 19:12:54 2026 +0800
ci: scope 1Password Connect env to core behavior fixture setup (#9060)
ci: scope Connect credentials to core behavior fixture setup
---
.github/actions/test_behavior_core/action.yaml | 39 ++++++++++++++++++++++++--
.github/workflows/test_behavior_core.yml | 13 +++------
2 files changed, 41 insertions(+), 11 deletions(-)
diff --git a/.github/actions/test_behavior_core/action.yaml
b/.github/actions/test_behavior_core/action.yaml
index d509cdebd3..f37841a2d8 100644
--- a/.github/actions/test_behavior_core/action.yaml
+++ b/.github/actions/test_behavior_core/action.yaml
@@ -24,6 +24,12 @@ inputs:
description: "The service to test"
feature:
description: "The feature to test"
+ op-connect-host:
+ description: "The 1Password Connect server URL"
+ required: false
+ op-connect-token:
+ description: "The 1Password Connect access token"
+ required: false
runs:
using: "composite"
@@ -36,7 +42,15 @@ runs:
TEST_SETUPS: ${{ inputs.setups }}
run: |
mkdir -p ./dynamic_test_core
- cat <<'EOF' >./dynamic_test_core/action.yml
+ connect_inputs='inputs:
+ op-connect-host: {}
+ op-connect-token: {}'
+ # Assemble literal expressions for the generated actions to evaluate.
+ dollar='$'
+ connect_host_ref="${dollar}{{ inputs.op-connect-host }}"
+ connect_token_ref="${dollar}{{ inputs.op-connect-token }}"
+ cat <<EOF >./dynamic_test_core/action.yml
+ $connect_inputs
runs:
using: composite
steps:
@@ -46,8 +60,24 @@ runs:
IFS=',' read -r -a setups <<<"$TEST_SETUPS"
for setup in "${setups[@]}"; do
setup_action="./dynamic_test_core/setup_$index"
+ fixture_action="./.github/services/$TEST_SERVICE/$setup"
+ setup_inputs=
+ setup_with=
+ fixture_env=
+ # Match the planner's 1Password reference check for this fixture.
+ if grep -Fq 'op://services' "$fixture_action/action.yml"; then
+ setup_inputs="$connect_inputs"
+ setup_with=" with:
+ op-connect-host: $connect_host_ref
+ op-connect-token: $connect_token_ref"
+ fixture_env=" env:
+ OP_CONNECT_HOST: $connect_host_ref
+ OP_CONNECT_TOKEN: $connect_token_ref"
+ fi
+
mkdir -p "$setup_action"
cat <<EOF >"$setup_action/action.yml"
+ $setup_inputs
runs:
using: composite
steps:
@@ -66,7 +96,8 @@ runs:
- name: Setup Test Core - $setup
id: setup_$index
if: always()
- uses: ./.github/services/$TEST_SERVICE/$setup
+ uses: $fixture_action
+ $fixture_env
- name: Run Test Core - $setup
if: always() && steps.setup_$index.outcome == 'success'
shell: bash
@@ -113,8 +144,12 @@ runs:
- name: Test Core - $setup
if: always()
uses: ./dynamic_test_core/setup_$index
+ $setup_with
EOF
index=$((index + 1))
done
- name: Run
uses: ./dynamic_test_core
+ with:
+ op-connect-host: ${{ inputs.op-connect-host }}
+ op-connect-token: ${{ inputs.op-connect-token }}
diff --git a/.github/workflows/test_behavior_core.yml
b/.github/workflows/test_behavior_core.yml
index afb03b3230..f9d8f001af 100644
--- a/.github/workflows/test_behavior_core.yml
+++ b/.github/workflows/test_behavior_core.yml
@@ -58,15 +58,6 @@ jobs:
need-rocksdb: ${{ matrix.cases.service != 'hf3fs' }}
github-token: ${{ secrets.GITHUB_TOKEN }}
- - name: Setup 1Password Connect
- if: inputs.enable_secrets
- shell: bash
- run: |
- echo "::add-mask::${{ secrets.OP_CONNECT_HOST }}"
- echo "::add-mask::${{ secrets.OP_CONNECT_TOKEN }}"
- echo "OP_CONNECT_HOST=${{ secrets.OP_CONNECT_HOST }}" >>
"$GITHUB_ENV"
- echo "OP_CONNECT_TOKEN=${{ secrets.OP_CONNECT_TOKEN }}" >>
"$GITHUB_ENV"
-
- name: Test Core
id: test
continue-on-error: ${{ inputs.retry_attempts > 1 }}
@@ -75,6 +66,8 @@ jobs:
setups: ${{ join(matrix.cases.setups, ',') }}
service: ${{ matrix.cases.service }}
feature: ${{ matrix.cases.feature }}
+ op-connect-host: ${{ inputs.enable_secrets &&
secrets.OP_CONNECT_HOST || '' }}
+ op-connect-token: ${{ inputs.enable_secrets &&
secrets.OP_CONNECT_TOKEN || '' }}
env:
# Forward the workflow token only for live/secret-enabled runs so
# deterministic local runs never inject external API tokens.
@@ -87,6 +80,8 @@ jobs:
setups: ${{ join(matrix.cases.setups, ',') }}
service: ${{ matrix.cases.service }}
feature: ${{ matrix.cases.feature }}
+ op-connect-host: ${{ inputs.enable_secrets &&
secrets.OP_CONNECT_HOST || '' }}
+ op-connect-token: ${{ inputs.enable_secrets &&
secrets.OP_CONNECT_TOKEN || '' }}
env:
GITHUB_TOKEN: ${{ inputs.enable_secrets && secrets.GITHUB_TOKEN ||
'' }}