Remove gotestfmt (second PR)#1072
Merged
Merged
Conversation
Member
|
Also for evaluation later is gotestsum. It supports the github actions format and will stream the results so you see the results of the tests as they finish. I've been using it in pulumi-cdk and it seems to work well. |
iwahbe
approved these changes
Sep 9, 2024
3 tasks
This was referenced Mar 11, 2026
github-merge-queue Bot
pushed a commit
that referenced
this pull request
Mar 12, 2026
Fixes #2106. ## Context We previously used [`gotestfmt`](#1069) to improve test output readability on CI, but it was [removed](#1072) 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 --format github-actions --"` on CI via the workflow `env:` block - `TESTTAGS ?= all` — overridden per-language in the non-shorted matrix path ## Why the workflow had to change too An earlier 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 change moves all test invocations through `make` so `GO_TEST_EXEC` is always honoured, and also aligns with the strategic goal of keeping workflows "dumb" — test logic lives in the Makefile, not scattered across workflow YAML. ## Changes - Add `GO_TEST_EXEC ?= go test` and `TESTTAGS ?= all` to both `base` and `parameterized-go` Makefile templates - Use `$(GO_TEST_EXEC)` and `$(TESTTAGS)` in `test` and `test_provider` make targets - Set `GO_TEST_EXEC: "gotestsum --format github-actions --"` in the test workflow's global `env:` - Replace non-sharded `go test` workflow steps with `make TESTTAGS=<language> GOTESTARGS=<flags> test` - Add `gotestsum` via aqua to `mise.test.toml` so it is installed in test workflow environments ## Test plan - [x] `make test-go test-providers` passes — all 15 test providers regenerate and pass actionlint - [x] Verify gotestsum output on a real provider CI run — sample run: pulumi/pulumi-awsx#1907 - Works like a charm! <img width="984" height="606" alt="image" src="https://github.com/user-attachments/assets/79e08f6a-4ec0-4483-93f6-f32f6d77406a" /> 🤖 Generated with [Claude Code](https://claude.com/claude-code) --------- Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Take 2 on removing gotestfmt. Since extension workflows still use it, retain the installation stanza, but not actually use in tests.
pulumi/pulumi-azure-native#3404 is promising but to be evaluated later I think?
Previously: #1069 #1071