go-average-coverage

module
v1.0.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 23, 2020 License: MIT

README

go-average-coverage

Returns the average coverage for multiple go packages. Suitable for use with Gitlab's test coverage parsing.

Install

$ go install github.com/skagget77/go-average-coverage/cmd/go-average-coverage

Note that if you're current working directory contains a go.mod file go-average-coverage will be added to it as a dependency, which you probably don't want.

With Gitlab

To use go-average-coverage in Gitlab's CI pipeline pipe the result of go test -cover to go-average-coverage.

test-my-app:
  stage: test
  script:
    - go test -cover -mod=readonly ./... | go-average-coverage

If you are using a standard golang docker image go-average-coverage can be installed on-the-fly with go install as described above.

Directories

Path Synopsis
cmd

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL