Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Jan 3, 2026

Integrates gotestfmt to format Go test output in GitHub Actions for better readability.

Changes

  • Added gotestfmt-action setup to test and integration jobs

    • Uses v2.2.0 pinned to SHA 8b4478c7019be847373babde9300210e7de34bfb
    • Configured with GITHUB_TOKEN to avoid rate limiting
  • Modified test commands to pipe through gotestfmt

    • Added set -euo pipefail for strict error handling
    • Redirected stderr with 2>&1 to capture all output
    • Preserved JSON artifacts via tee before formatting

Output Format

Tests now render with collapsible sections, timing info, and status indicators:

# Before
=== RUN   TestCapitalizationConsistency
--- PASS: TestCapitalizationConsistency (0.08s)
PASS

# After
📦 github.com/githubnext/gh-aw/cmd/gh-aw
::group::✅ TestCapitalizationConsistency (80ms)
::endgroup::

The ::group:: markers create collapsible sections in GitHub Actions UI, making it easier to scan test results and identify failures.

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • https://api.github.com/repos/GoTestTools/gotestfmt-action/commits/v2
    • Triggering command: /usr/bin/curl curl -s REDACTED (http block)
  • https://api.github.com/repos/GoTestTools/gotestfmt-action/git/refs/tags/v2.5.0
    • Triggering command: /usr/bin/curl curl -s REDACTED (http block)

If you need me to access, download, or install something from one of these locations, you can either:

Original prompt

Use gotestfmt in ci.yml to prettify go test output in actions

https://github.com/GoTestTools/gotestfmt


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Copilot AI changed the title [WIP] Use gotestfmt to prettify Go test output in CI Use gotestfmt in ci.yml to prettify go test output in actions Jan 3, 2026
Copilot AI requested a review from pelikhan January 3, 2026 14:33
@pelikhan pelikhan closed this Jan 3, 2026
@pelikhan pelikhan deleted the copilot/use-gotestfmt-in-ci branch January 4, 2026 04:22
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.

2 participants