mirror of
https://github.com/tiennm99/goclaw.git
synced 2026-10-13 16:14:57 +00:00
ci: cap go test -timeout to 90s to bound CI hang impact
Deadlocked tests previously blocked CI for the full 10-minute Go default before failing. Wave C had a live example: a test timeout branch using `<-t.Context().Done()` (which never fires until test return) combined with a dispatch-suppressing patch caused a 10-min GH Actions stall. Cap every test binary at 90s. Wave C race-heavy suites run in <20s locally, so 90s leaves ample breathing room while failing fast on any future deadlock. Applied to both CI workflow and Makefile so local `make test` enforces the same bound. Unit-level defenses (proper `time.After` timeouts in tests) are still the right fix — this is a safety net, not a substitute.
This commit is contained in:
1 parent
a8b48024fc
commit
ee75d498e6
2 files changed
+5
-2
No files matched your search
@@ -21,7 +21,10 @@ jobs:
|
||||
- run: go build ./...
|
||||
- run: go build -tags sqliteonly ./...
|
||||
- run: go vet ./...
|
||||
- run: go test -race -coverpkg=./... -coverprofile=coverage.out ./...
|
||||
# -timeout=90s caps each test binary so a deadlocked test fails fast
|
||||
# instead of blocking CI for the 10-minute default. Race-heavy wave C
|
||||
# suites run in <20s, so 90s leaves ample breathing room.
|
||||
- run: go test -race -timeout=90s -coverpkg=./... -coverprofile=coverage.out ./...
|
||||
- name: Coverage summary
|
||||
run: go tool cover -func=coverage.out | tail -1
|
||||
- name: Coverage ratchet gate
|
||||
|
||||
Reference in new issue
Block a user