Skip to content

Add GO_TEST_EXEC and TESTTAGS to use gotestsum on CI#2109

Closed
pose wants to merge 1 commit into
masterfrom
pose/chores/gotestsum-2106-v2
Closed

Add GO_TEST_EXEC and TESTTAGS to use gotestsum on CI#2109
pose wants to merge 1 commit into
masterfrom
pose/chores/gotestsum-2106-v2

Conversation

@pose

@pose pose commented Mar 12, 2026

Copy link
Copy Markdown
Member

Fixes #2106.

Context

We previously used gotestfmt to improve test output readability on CI, but it was removed because it was mis-attributing logs from one test to another and not reporting logs when a panic was encountered — making failures harder to diagnose rather than easier.

gotestsum is a more robust alternative. This PR introduces two Makefile variables:

  • GO_TEST_EXEC ?= go test — set to "gotestsum --" on CI via the workflow env: block
  • TESTTAGS ?= all — overridden per-language in the non-sharded matrix path

Why the previous approach didn't work

The first attempt set GO_TEST_EXEC in the workflow env and relied on Make's ?= to pick it up. This worked for the sharded path (which calls make test), but not the non-sharded path, which called go test directly in the workflow YAML — bypassing the Makefile entirely. awsx uses the non-sharded path, so GO_TEST_EXEC was never consulted.

This approach

Move all test invocations through make so GO_TEST_EXEC is always honoured:

  • Non-sharded steps now call make TESTTAGS=<language> GOTESTARGS=<flags> test instead of direct go test
  • Sharded path already went through make test and continues to do so

This also aligns with the strategic goal of keeping workflows "dumb" — test logic lives in the Makefile, not scattered across workflow YAML.

Also installs gotestsum via aqua in mise.test.toml so it is available in test workflow environments.

Test plan

  • make test-go test-providers passes — all 15 test providers regenerate and pass actionlint
  • Verify gotestsum output on a real provider CI run

🤖 Generated with Claude Code

Introduce two new Makefile variables:
- GO_TEST_EXEC ?= go test  — overridden to "gotestsum --" via workflow env on CI
- TESTTAGS ?= all           — overridden per language in the non-sharded matrix path

Move test invocations out of the workflow YAML and into make targets so that
GO_TEST_EXEC is always picked up:
- Non-sharded path previously called go test directly, bypassing the Makefile
  entirely; it now calls make TESTTAGS=<language> GOTESTARGS=<flags> test
- Sharded path already went through make test and continues to do so

Also installs gotestsum via mise in the test environment (mise.test.toml).

Closes #2106

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@pose pose requested review from a team March 12, 2026 10:11
@pose pose self-assigned this Mar 12, 2026
@pose pose added this to the 0.134 milestone Mar 12, 2026
@pose pose closed this Mar 12, 2026
@pose

pose commented Mar 12, 2026

Copy link
Copy Markdown
Member Author

Sorry @corymhall , I thought I merged the previous PR already. I am updating the previous PR!

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.

Make all providers use gotestsum

2 participants