Skip to content

go testcoverage action

Actions
Run tests and get coverage on your Go code
v1
Latest
Star (1)

Go test coverage action

Use this action to run tests in Golang and make sure are complying with the coverage. Support the use of go test and ginkgo commands

Usage

Basic usage using go test:

- name: Coverage test
  uses: joyarzun/go-testcoverage-action@v1
  with:
    coverage-threshold: 80

Basic usage using ginkgo:

- name: Coverage test
  uses: joyarzun/go-testcoverage-action@v1
  with:
    use-ginkgo: true
    coverage-threshold: 80

Usage options

install-go:
  description: |
    By default the action install a version of Go appropriate for building and running.
    If set to false, you will need to have installed Go.
  required: true
  default: true
go-version:
  description: |
    Version of Go
  required: false
  default: 1.19.x
cache-key:
  description: |
    Custom string to include in the cache key. This is useful when using multiple Go versions.
  required: false
coverage-threshold:
  description: |
    The threshold in percentage to consider the test successful. Default is 0 so any test will pass
  required: true
  default: 0
use-ginkgo:
  description: |
    Use ginkgo to run tests and get the coverage
  required: false
  default: false
workdir:
  description: |
    Go base directory
  required: false
  default: .

go testcoverage action is not certified by GitHub. It is provided by a third-party and is governed by separate terms of service, privacy policy, and support documentation.

About

Run tests and get coverage on your Go code
v1
Latest

go testcoverage action is not certified by GitHub. It is provided by a third-party and is governed by separate terms of service, privacy policy, and support documentation.