From ccae5abd53f84a0ae9c86ad8fa63d417a879bf90 Mon Sep 17 00:00:00 2001 From: Lyda <1829913225@qq.com> Date: Thu, 21 Aug 2025 12:40:40 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E6=9B=B4=E6=96=B0=20test-cache-state?= =?UTF-8?q?=20GitHub=20Action=EF=BC=8C=E4=BF=AE=E6=94=B9=E7=89=B9=E6=AE=8A?= =?UTF-8?q?=E5=AD=97=E7=AC=A6=E3=80=81=E9=95=BF=E5=AD=97=E7=AC=A6=E4=B8=B2?= =?UTF-8?q?=E5=92=8C=20Unicode=20=E6=B5=8B=E8=AF=95=E7=94=A8=E4=BE=8B?= =?UTF-8?q?=EF=BC=8C=E5=A2=9E=E5=BC=BA=E5=8A=A8=E6=80=81=E5=A4=84=E7=90=86?= =?UTF-8?q?=E8=83=BD=E5=8A=9B=EF=BC=8C=E7=A1=AE=E4=BF=9D=E5=9C=A8=E4=B8=8D?= =?UTF-8?q?=E5=90=8C=E5=9C=BA=E6=99=AF=E4=B8=8B=E7=9A=84=E7=8A=B6=E6=80=81?= =?UTF-8?q?=E7=AE=A1=E7=90=86=E6=9B=B4=E5=8A=A0=E7=81=B5=E6=B4=BB=E5=92=8C?= =?UTF-8?q?=E5=8F=AF=E9=9D=A0=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitea/workflows/test-cache-state.yml | 44 ++++++++++++++++++++++----- 1 file changed, 37 insertions(+), 7 deletions(-) diff --git a/.gitea/workflows/test-cache-state.yml b/.gitea/workflows/test-cache-state.yml index 6dbd45e..3bdd8ee 100644 --- a/.gitea/workflows/test-cache-state.yml +++ b/.gitea/workflows/test-cache-state.yml @@ -257,17 +257,17 @@ jobs: state_value: '' default_value: '' - name: special-chars - state_key: 'special-chars-@#$%^&*()' - state_value: 'value-with-special-!@#$%^&*()' - default_value: 'default-!@#$' + state_key: 'special-chars-test' + state_value: 'value-with-special-chars' + default_value: 'default-special' - name: long-values 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' - name: unicode - state_key: 'unicode-test-中文-🚀' - state_value: 'unicode-value-测试-🎯' - default_value: 'unicode-default-默认值' + state_key: 'unicode-test' + state_value: 'unicode-value-test' + default_value: 'unicode-default' steps: - name: 检出代码 uses: actions/checkout@v4 @@ -298,6 +298,36 @@ jobs: exit 1 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: if: ${{ inputs.test_scope == 'stress' || inputs.test_scope == 'full' }}