Skip to content
You're viewing an older version of this GitHub Action. Do you want to see the latest version instead?
check

GitHub Action

Golang Test Annotations

v0.5.0

Golang Test Annotations

check

Golang Test Annotations

Given a test output of go test, the failed tests will be annotated

Installation

Copy and paste the following snippet into your .yml file.

              

- name: Golang Test Annotations

uses: guyarb/golang-test-annotations@v0.5.0

Learn more about this action in guyarb/golang-test-annotations

Choose a version

golang-test-annotations

A github action which annotates failed tests.

GitHub Annotations

An example run can be found here

How to use

Add to your workflow the following contents:

name: pr

on:
  pull_request:
    branches: [ '**' ]
  workflow_dispatch:
    branches: [ '**' ]

jobs:
  full_ci:
    strategy:
      matrix:
        go-version: [ 1.14.x ]

    runs-on: ubuntu-18.04

    steps:
      - name: checkout
        uses: actions/checkout@v2

      - name: run tests
        run: go test -json ./... > test.json

      - name: Annotate tests
        if: always()
        uses: guyarb/golang-test-annotations@v0.3.0
        with:
          test-results: test.json
          package-name: foobar # optional, if using custom package name, github.com/owner/repo stripped from the pathname by default

Development of this action

  1. Fork this repo.
  2. Create a branch with your feature/bugfix.
  3. Open a PR to me.

Issues

Please open issues for any bug or suggestion you have.