fix(ci): 增量测试选择脚本过滤已删除的测试文件 (#610)
CI/CD Pipeline / Check if frontend-only change (push) Has been skipped
CI/CD Pipeline / Build Production API Image (push) Has been skipped
CI/CD Pipeline / Build Production Web Image (push) Has been skipped
CI/CD Pipeline / Build Production Worker Image (push) Has been skipped
CI/CD Pipeline / Deploy Production (push) Has been skipped
CI/CD Pipeline / Production Browser E2E (push) Has been skipped
CI/CD Pipeline / Build Staging Web Image (push) Successful in 32s
CI/CD Pipeline / Frontend Unit Tests (push) Successful in 4m14s
CI/CD Pipeline / Unit Tests (push) Successful in 4m19s
CI/CD Pipeline / Frontend Lint (push) Successful in 4m21s
CI/CD Pipeline / Validate Code Quality And Tests (push) Successful in 4m28s
CI/CD Pipeline / Integration Tests (push) Successful in 1m30s
CI/CD Pipeline / Build Staging API Image (push) Successful in 6m11s
CI/CD Pipeline / Build Staging Worker Image (push) Successful in 8m4s
CI/CD Pipeline / ACR Image Cleanup (push) Failing after 8s
CI/CD Pipeline / Deploy Staging (Watchtower auto-deploy) (push) Successful in 49s
CI/CD Pipeline / Staging API Integration Tests (push) Successful in 3m57s
CI/CD Pipeline / Staging E2E Tests (push) Failing after 4m39s
CI/CD Pipeline / Check if frontend-only change (push) Has been skipped
CI/CD Pipeline / Build Production API Image (push) Has been skipped
CI/CD Pipeline / Build Production Web Image (push) Has been skipped
CI/CD Pipeline / Build Production Worker Image (push) Has been skipped
CI/CD Pipeline / Deploy Production (push) Has been skipped
CI/CD Pipeline / Production Browser E2E (push) Has been skipped
CI/CD Pipeline / Build Staging Web Image (push) Successful in 32s
CI/CD Pipeline / Frontend Unit Tests (push) Successful in 4m14s
CI/CD Pipeline / Unit Tests (push) Successful in 4m19s
CI/CD Pipeline / Frontend Lint (push) Successful in 4m21s
CI/CD Pipeline / Validate Code Quality And Tests (push) Successful in 4m28s
CI/CD Pipeline / Integration Tests (push) Successful in 1m30s
CI/CD Pipeline / Build Staging API Image (push) Successful in 6m11s
CI/CD Pipeline / Build Staging Worker Image (push) Successful in 8m4s
CI/CD Pipeline / ACR Image Cleanup (push) Failing after 8s
CI/CD Pipeline / Deploy Staging (Watchtower auto-deploy) (push) Successful in 49s
CI/CD Pipeline / Staging API Integration Tests (push) Successful in 3m57s
CI/CD Pipeline / Staging E2E Tests (push) Failing after 4m39s
Co-authored-by: xiaoxia <dev@xiaoxiajianji.com> Co-committed-by: xiaoxia <dev@xiaoxiajianji.com>
This commit was merged in pull request #610.
This commit is contained in:
@@ -158,10 +158,13 @@ def select_tests(changed_files):
|
||||
source_file_changes = []
|
||||
|
||||
for f in changed_files:
|
||||
# 测试文件本身改动
|
||||
# 测试文件本身改动(仅保留仍存在的文件,删除的测试文件不加入运行列表)
|
||||
if f.startswith("tests/unit/test_") and f.endswith(".py"):
|
||||
test_file_changes.append(f)
|
||||
selected.add(f)
|
||||
if (ROOT / f).exists():
|
||||
test_file_changes.append(f)
|
||||
selected.add(f)
|
||||
else:
|
||||
print(f"[skip-deleted] 测试文件已删除,跳过: {f}")
|
||||
# 源码文件改动
|
||||
elif f.endswith(".py"):
|
||||
source_file_changes.append(f)
|
||||
|
||||
Reference in New Issue
Block a user