Skip to content

Commit b2e4bc2

Browse files
committed
ci: race-detector on -short, separate full pass without race
The combined `go test -race ./...` run blew past 30m on the runner — TestHandleVKV3SolidityShape alone burns 51s+ under race because gnark's G2 Setup batch-mul is goroutine-heavy and race instrumentation taxes every step. That single test dragged the whole job past the deadline. Split the test job into two passes: - `go test -race -short -count=1 -timeout 15m ./...` — race detector with the heavy ZK end-to-end tests skipped (they're already gated on testing.Short() across internal/server/*_test.go and prover/*_test.go). Locally ~50s; expect 5-10 min on the runner. - `go test -count=1 -timeout 15m ./...` — full coverage without race to keep functional regression coverage on the heavy paths. Locally ~73s; expect 5-10 min on the runner. Race detector still covers everything that actually races — HTTP handlers, storage, parsing, in-memory state machine. The ZK solver runs sequentially in the prover path, so racing it adds little signal and a lot of wall clock.
1 parent 2e600e2 commit b2e4bc2

1 file changed

Lines changed: 15 additions & 6 deletions

File tree

.github/workflows/ci.yml

Lines changed: 15 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -51,12 +51,21 @@ jobs:
5151
- name: Build wasm prover
5252
run: make wasm
5353

54-
# Race detector roughly 5-10× the wall clock of normal `go test`.
55-
# internal/server and prover both blow past the default 10m
56-
# ceiling (gnark Setup + Prove are heavy). 30m headroom keeps it
57-
# green without giving up on the race build.
58-
- name: Go tests (race detector)
59-
run: go test -race -count=1 -timeout 30m ./...
54+
# Race detector + gnark Setup/Prove blow past the default 10m
55+
# test ceiling. -short skips the heavy ZK end-to-end tests
56+
# (gated on testing.Short() in internal/server/*_test.go and
57+
# prover/*_test.go) — those wouldn't surface a race anyway since
58+
# gnark's solver runs sequentially in the prover path. Race
59+
# detector still covers HTTP handlers, storage, parsing, and
60+
# the in-memory state machine, which is where actual races
61+
# would live.
62+
- name: Go tests (race detector, short)
63+
run: go test -race -short -count=1 -timeout 15m ./...
64+
65+
# Full coverage without race — catches functional regressions in
66+
# the heavy tests that race-mode skips.
67+
- name: Go tests (full, no race)
68+
run: go test -count=1 -timeout 15m ./...
6069

6170
js-parity:
6271
runs-on: ubuntu-latest

0 commit comments

Comments
 (0)