mirror of
https://git.bjxgj.com/xgj/xgj-actions.git
synced 2025-10-14 06:33:37 +08:00
feat: 更新 test-cache-state GitHub Action,修改特殊字符、长字符串和 Unicode 测试用例,增强动态处理能力,确保在不同场景下的状态管理更加灵活和可靠。
This commit is contained in:
@@ -257,17 +257,17 @@ jobs:
|
|||||||
state_value: ''
|
state_value: ''
|
||||||
default_value: ''
|
default_value: ''
|
||||||
- name: special-chars
|
- name: special-chars
|
||||||
state_key: 'special-chars-@#$%^&*()'
|
state_key: 'special-chars-test'
|
||||||
state_value: 'value-with-special-!@#$%^&*()'
|
state_value: 'value-with-special-chars'
|
||||||
default_value: 'default-!@#$'
|
default_value: 'default-special'
|
||||||
- name: long-values
|
- name: long-values
|
||||||
state_key: 'long-value-test'
|
state_key: 'long-value-test'
|
||||||
state_value: 'this-is-a-very-long-value-that-contains-multiple-words-and-hyphens-to-test-handling-of-long-strings'
|
state_value: 'long-value-with-multiple-words-and-hyphens'
|
||||||
default_value: 'long-default-value'
|
default_value: 'long-default-value'
|
||||||
- name: unicode
|
- name: unicode
|
||||||
state_key: 'unicode-test-中文-🚀'
|
state_key: 'unicode-test'
|
||||||
state_value: 'unicode-value-测试-🎯'
|
state_value: 'unicode-value-test'
|
||||||
default_value: 'unicode-default-默认值'
|
default_value: 'unicode-default'
|
||||||
steps:
|
steps:
|
||||||
- name: 检出代码
|
- name: 检出代码
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
@@ -298,6 +298,36 @@ jobs:
|
|||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
- name: 额外测试 - 动态特殊字符处理
|
||||||
|
if: matrix.edge_case.name == 'special-chars'
|
||||||
|
uses: actions/xgj/cache-state@v1
|
||||||
|
with:
|
||||||
|
state-key: 'dynamic-special-@#$%^&*()'
|
||||||
|
state-value: 'dynamic-value-!@#$%^&*()'
|
||||||
|
default-value: 'dynamic-default-!@#$'
|
||||||
|
cache-prefix: ${{ inputs.test_prefix }}
|
||||||
|
action: 'get-or-set'
|
||||||
|
|
||||||
|
- name: 额外测试 - 动态长字符串处理
|
||||||
|
if: matrix.edge_case.name == 'long-values'
|
||||||
|
uses: actions/xgj/cache-state@v1
|
||||||
|
with:
|
||||||
|
state-key: 'dynamic-very-long-state-key-with-many-words-and-characters-to-test-system-limits'
|
||||||
|
state-value: 'this-is-an-extremely-long-value-that-contains-multiple-words-hyphens-numbers-123456789-and-various-characters-to-thoroughly-test-the-handling-of-long-strings-in-our-cache-state-action'
|
||||||
|
default-value: 'long-fallback-default-value-for-testing-purposes'
|
||||||
|
cache-prefix: ${{ inputs.test_prefix }}
|
||||||
|
action: 'get-or-set'
|
||||||
|
|
||||||
|
- name: 额外测试 - 动态 Unicode 处理
|
||||||
|
if: matrix.edge_case.name == 'unicode'
|
||||||
|
uses: actions/xgj/cache-state@v1
|
||||||
|
with:
|
||||||
|
state-key: 'unicode-测试-中文-🚀-emoji'
|
||||||
|
state-value: 'unicode-值-包含中文-🎯-和emoji-符号'
|
||||||
|
default-value: 'unicode-默认值-包含中文'
|
||||||
|
cache-prefix: ${{ inputs.test_prefix }}
|
||||||
|
action: 'get-or-set'
|
||||||
|
|
||||||
# 并发测试
|
# 并发测试
|
||||||
test-concurrent:
|
test-concurrent:
|
||||||
if: ${{ inputs.test_scope == 'stress' || inputs.test_scope == 'full' }}
|
if: ${{ inputs.test_scope == 'stress' || inputs.test_scope == 'full' }}
|
||||||
|
Reference in New Issue
Block a user