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,统一运行环境为 ubuntu-node-20,以支持 Node.js 20 的特性,提升测试的兼容性和性能。
This commit is contained in:
@@ -79,7 +79,7 @@ jobs:
|
|||||||
# 操作类型专项测试
|
# 操作类型专项测试
|
||||||
test-operation-types:
|
test-operation-types:
|
||||||
if: ${{ inputs.test_scope == 'operations' || inputs.test_scope == 'full' }}
|
if: ${{ inputs.test_scope == 'operations' || inputs.test_scope == 'full' }}
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-node-20
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
operation: [get, set, get-or-set]
|
operation: [get, set, get-or-set]
|
||||||
@@ -150,7 +150,7 @@ jobs:
|
|||||||
# 缓存行为测试
|
# 缓存行为测试
|
||||||
test-cache-behavior:
|
test-cache-behavior:
|
||||||
if: ${{ inputs.test_scope == 'operations' || inputs.test_scope == 'full' }}
|
if: ${{ inputs.test_scope == 'operations' || inputs.test_scope == 'full' }}
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-node-20
|
||||||
steps:
|
steps:
|
||||||
- name: 检出代码
|
- name: 检出代码
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
@@ -248,7 +248,7 @@ jobs:
|
|||||||
# 边界情况测试
|
# 边界情况测试
|
||||||
test-edge-cases:
|
test-edge-cases:
|
||||||
if: ${{ inputs.test_scope == 'edge-cases' || inputs.test_scope == 'full' }}
|
if: ${{ inputs.test_scope == 'edge-cases' || inputs.test_scope == 'full' }}
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-node-20
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
edge_case:
|
edge_case:
|
||||||
@@ -301,7 +301,7 @@ jobs:
|
|||||||
# 并发测试
|
# 并发测试
|
||||||
test-concurrent:
|
test-concurrent:
|
||||||
if: ${{ inputs.test_scope == 'stress' || inputs.test_scope == 'full' }}
|
if: ${{ inputs.test_scope == 'stress' || inputs.test_scope == 'full' }}
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-node-20
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
worker: [1, 2, 3, 4, 5]
|
worker: [1, 2, 3, 4, 5]
|
||||||
@@ -337,7 +337,7 @@ jobs:
|
|||||||
# 过期时间测试
|
# 过期时间测试
|
||||||
test-expiry:
|
test-expiry:
|
||||||
if: ${{ inputs.test_scope == 'expiry' || inputs.test_scope == 'full' }}
|
if: ${{ inputs.test_scope == 'expiry' || inputs.test_scope == 'full' }}
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-node-20
|
||||||
steps:
|
steps:
|
||||||
- name: 检出代码
|
- name: 检出代码
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
@@ -467,7 +467,7 @@ jobs:
|
|||||||
# 删除功能测试
|
# 删除功能测试
|
||||||
test-delete-operations:
|
test-delete-operations:
|
||||||
if: ${{ inputs.test_scope == 'delete' || inputs.test_scope == 'full' }}
|
if: ${{ inputs.test_scope == 'delete' || inputs.test_scope == 'full' }}
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-node-20
|
||||||
steps:
|
steps:
|
||||||
- name: 检出代码
|
- name: 检出代码
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
@@ -615,7 +615,7 @@ jobs:
|
|||||||
# 错误处理测试
|
# 错误处理测试
|
||||||
test-error-handling:
|
test-error-handling:
|
||||||
if: ${{ inputs.test_scope == 'edge-cases' || inputs.test_scope == 'full' }}
|
if: ${{ inputs.test_scope == 'edge-cases' || inputs.test_scope == 'full' }}
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-node-20
|
||||||
steps:
|
steps:
|
||||||
- name: 检出代码
|
- name: 检出代码
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
@@ -679,7 +679,7 @@ jobs:
|
|||||||
cleanup-test-cache:
|
cleanup-test-cache:
|
||||||
if: ${{ inputs.clean_cache && always() }}
|
if: ${{ inputs.clean_cache && always() }}
|
||||||
needs: [test-basic-operations, test-operation-types, test-cache-behavior, test-edge-cases, test-concurrent, test-error-handling]
|
needs: [test-basic-operations, test-operation-types, test-cache-behavior, test-edge-cases, test-concurrent, test-error-handling]
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-node-20
|
||||||
steps:
|
steps:
|
||||||
- name: 检出代码
|
- name: 检出代码
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
@@ -708,7 +708,7 @@ jobs:
|
|||||||
test-summary:
|
test-summary:
|
||||||
needs: [test-basic-operations, test-operation-types, test-cache-behavior, test-edge-cases, test-expiry, test-delete-operations, test-concurrent, test-error-handling]
|
needs: [test-basic-operations, test-operation-types, test-cache-behavior, test-edge-cases, test-expiry, test-delete-operations, test-concurrent, test-error-handling]
|
||||||
if: always()
|
if: always()
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-node-20
|
||||||
steps:
|
steps:
|
||||||
- name: 生成测试报告
|
- name: 生成测试报告
|
||||||
run: |
|
run: |
|
||||||
|
Reference in New Issue
Block a user