GitHub - robherley/go-test-action: 🧪 Action to run go test with rich summary output and annotations. (original) (raw)

go-test-action

GitHub Action for running go test ./... and getting rich summary and annotations as output.

Powered by Job Summaries, this Action will generate a convenient interactive viewer for tests based on Go's test2json output. If there are any errors during go test, the Action will report back the same exit code, which will fail the job.

Quick start

Inputs

Screenshots

Tests are organized per package, with a brief summary of individual test results:

summary overview

Expand for per-test (with subtest) results and to view raw test output:

summary expanded

Examples

Basic

name: Go

on: push:

jobs: test: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4

- name: Set up Go
  uses: actions/setup-go@v5
  with:
    go-version-file: go.mod

- name: Build
  run: go build -v ./...

- name: Test
  uses: robherley/go-test-action@v0

Using existing test file

Omitting elements

See Inputs above for valid options

or