Skip to content

ci(dispatch): 把這批新增的純單元測試補進 -run 白名單(否則 CI 根本沒跑到) - #67

Merged
thothawei merged 1 commit into
mainfrom
claude/ci-cover-new-unit-tests
Jul 29, 2026
Merged

ci(dispatch): 把這批新增的純單元測試補進 -run 白名單(否則 CI 根本沒跑到)#67
thothawei merged 1 commit into
mainfrom
claude/ci-cover-new-unit-tests

Conversation

@thothawei

Copy link
Copy Markdown
Owner

問題

CI 不啟 Docker,internal/service 只跑 workflow 裡手動維護的 -run 白名單
這批(#61#62#63)新增的純單元測試沒有一個在名單上

  • TestCustomerPushCopy_白名單(推播型別白名單與 App 端對齊)
  • TestCustomerRidePushData_只帶對帳需要的兩個鍵
  • TestNotifyCustomerRide_*
  • TestPreviewText(rune 截斷,避免中文被切壞)
  • TestLostItemPushTitle(五種標題,含 closed 的兩種說法)

也就是說這幾支 PR 的 CI 綠燈,並不代表這些測試跑過——本機有 Docker 才跑得到。
順手補上一直漏掉的 TestRideOfferPushData

做了什麼

  • 把上述測試名加進 -run 白名單。
  • 在註解寫明這是手動白名單、新增測試要記得補,免得下次又漏。

驗證

以新名單在 CGO_ENABLED=0沒有 Docker 的條件下跑:28 個測試通過、0.7 秒完成
——0.7 秒也順便證明了它們真的沒碰 DB(碰到的話會去起容器,要 20 秒以上)。

🤖 Generated with Claude Code

CI 不啟 Docker,service 套件只跑手動維護的 -run 白名單。這批(U/U2/U3)新增的
TestCustomerPushCopy_/TestCustomerRidePushData_/TestNotifyCustomerRide_/
TestPreviewText/TestLostItemPushTitle 都沒在名單上——本機有 Docker 才跑得到,
CI 綠燈其實不代表它們跑過。順手補上一直漏掉的 TestRideOfferPushData。

同時在註解寫明這是手動白名單、新增測試要記得補,免得下次又漏。

驗證:以新名單在 CGO_ENABLED=0、無 Docker 條件下跑,28 個測試通過、0.7 秒完成
(真的沒碰 DB)。

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@thothawei
thothawei merged commit c7a8534 into main Jul 29, 2026
1 check passed
@thothawei
thothawei deleted the claude/ci-cover-new-unit-tests branch July 29, 2026 18:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant