From 74e815bedf2630b06cc4cab28621aa6fee7fbac9 Mon Sep 17 00:00:00 2001 From: wangdefa <1+wangdefa@noreply.gitea.bcde.io> Date: Tue, 20 Oct 2026 23:20:17 -0700 Subject: [PATCH] =?UTF-8?q?ci:=20=E7=A7=BB=E9=99=A4=E5=B7=B2=E8=BF=87?= =?UTF-8?q?=E6=97=B6=E7=9A=84=20TempDir=20=E9=87=8D=E8=AF=95=E5=85=9C?= =?UTF-8?q?=E5=BA=95=EF=BC=8C=E6=B5=8B=E8=AF=95=E6=94=B9=E4=B8=BA=E5=8D=95?= =?UTF-8?q?=E8=B7=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit db 跨轮污染(f8454d3)与 server TempDir 竞态(98515a3)均已根治, 重试兜底的前提不复存在:恢复为 go test 单跑,红了即真红。 --- .gitea/workflows/ci.yml | 16 ++-------------- 1 file changed, 2 insertions(+), 14 deletions(-) diff --git a/.gitea/workflows/ci.yml b/.gitea/workflows/ci.yml index cda1bf2..0048e53 100644 --- a/.gitea/workflows/ci.yml +++ b/.gitea/workflows/ci.yml @@ -114,20 +114,8 @@ jobs: run: go vet ./... - name: 测试 - run: | - # -p 1:各包共用一个库,串行执行避免跨包数据竞争。 - run_tests() { - go test -p 1 ./... -count=1 - } - # 已知偶发:server 包的后台 worker 会在测试结束后继续写 t.TempDir(), - # 触发 "TempDir RemoveAll cleanup: directory not empty"。根因是 - # Manager.Close() 只关库、不等 task goroutine 退出,属于既有问题。 - # 先重试一次兜住;真实失败会在两次里都失败,不会被掩盖。 - if run_tests; then - exit 0 - fi - echo "::: 第一次失败,重试一次(可能是已知的 TempDir 清理竞态)" >&2 - run_tests + # -p 1:各包共用一个库,串行执行避免跨包数据竞争。 + run: go test -p 1 ./... -count=1 frontend: runs-on: ubuntu-latest-amd64