[v0.2.0] Run go test with -shuffle=on in CI
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 78/100
Research direction
Start with .github/workflows/ci.yml and the README Testing section. Run the existing go test -race command with -shuffle=on, then repeat it for five runs and use any reported seed for reproduction if needed. Done means CI includes shuffling, all five runs pass, and README Testing explains seed-based reproduction.
Written by the indexing model from the issue text.
Description
Problem
The shared-anvil test pattern reuses one *Anvil instance across subtests, with ResetState between them. If a subtest accidentally relies on state set up by a previous one (instead of constructing its own), the tests pass in declaration order but break under reordering.
go test -shuffle=on runs tests in randomized order. Catching that drift is cheap and worth it.
Proposal
In .github/workflows/ci.yml, add -shuffle=on to the go test invocation:
- run: go test -race ./...
+ run: go test -race -shuffle=on ./...
Failures will print the seed; we can add -shuffle=<seed> to reproduce locally.
Acceptance criteria
- CI runs
-shuffle=on. - All tests pass with shuffling for at least 5 consecutive runs (i.e. the seed is properly random and we don't have hidden ordering deps).
- README "Testing" section mentions the seed-reproduction trick.
- Dominant language
- Go
- Stars
- 1
- Forks
- 0
- PR merge metrics
- No merged PRs in 30d
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from neverDefined/go-anvil
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
neverDefined/go-anvil#80 ·
-
area:ci type:chore
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
neverDefined/go-anvil#73 ·
-
area:docs type:chore
Difficulty 2/5 1-2 days Newbie friendliness 76/100
neverDefined/go-anvil#72 ·
-
area:ci area:tests type:chore
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
neverDefined/go-anvil#66 ·
-
area:code type:breaking
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
neverDefined/go-anvil#61 ·
All issues in neverDefined/go-anvil
Similar issues
-
Difficulty 1/5 Under an hour Newbie friendliness 84/100
-
enhancement needs triage
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
-
kind/cleanup
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
kubernetes-sigs/kueue#15947 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
sympozium-ai/sympozium#627 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 86/100