github.com/LawrenceWoodman/roveralls@v0.0.0-20171119193843-51b78509b607/README.md (about) 1 roveralls 2 ========= 3 4 A Go recursive coverage testing tool. 5 6 [![GoDoc](https://godoc.org/github.com/lawrencewoodman/roveralls?status.svg)](https://godoc.org/github.com/lawrencewoodman/roveralls) 7 [![Build Status](https://travis-ci.org/lawrencewoodman/roveralls.svg?branch=master)](https://travis-ci.org/lawrencewoodman/roveralls) 8 [![Build status](https://ci.appveyor.com/api/projects/status/5dcyd6wgu7fxt538?svg=true)](https://ci.appveyor.com/project/lawrencewoodman/roveralls) 9 [![Coverage Status](https://coveralls.io/repos/lawrencewoodman/roveralls/badge.svg?branch=master)](https://coveralls.io/r/lawrencewoodman/roveralls?branch=master) 10 [![Go Report Card](https://goreportcard.com/badge/github.com/lawrencewoodman/roveralls)](https://goreportcard.com/report/github.com/lawrencewoodman/roveralls) 11 12 13 roveralls runs coverage tests on a package and all its sub-packages. The coverage profile is output as a single file called 'roveralls.coverprofile' for use by tools such as goveralls. 14 15 This tool was inspired by [github.com/go-playground/overalls](https://github.com/go-playground/overalls) written by Dean Karn, but I found it difficult to test and brittle so I decided to rewrite it from scratch. Thanks for the inspiration Dean. 16 17 Usage 18 ----- 19 At its simplest, to test the current package and sub-packages and create a `roveralls.coverprofile` file in the directory that you run the command: 20 21 $ roveralls 22 23 To see the help for the command: 24 25 $ roveralls -help 26 27 roveralls runs coverage tests on a package and all its sub-packages. The 28 coverage profile is output as a single file called 'roveralls.coverprofile' 29 for use by tools such as goveralls. 30 31 Usage of roveralls: 32 -covermode count,set,atomic 33 Mode to run when testing files: count,set,atomic (default "count") 34 -help 35 Display this help 36 -ignore dir1,dir2,... 37 Comma separated list of directory names to ignore: dir1,dir2,... (default ".git,vendor") 38 -short 39 Tell long-running tests to shorten their run time 40 -v Verbose output 41 42 43 View Output in a Web Browser 44 ---------------------------- 45 To view the code coverage for you packge in a browser: 46 47 $ go tool cover -html=roveralls.coverprofile 48 49 Use with goveralls 50 ------------------ 51 The output of `roveralls` is the same as the the standard `go test -coverprofile=profile.coverprofile` but with multiple files tested in the output file. This can therefore be used with tools such as `goveralls`. 52 53 If you wanted to call it from a `.travis.yml` script you could use: 54 55 - $HOME/gopath/bin/roveralls 56 - $HOME/gopath/bin/goveralls -coverprofile=roveralls.coverprofile -service=travis-ci 57 58 Contributing 59 ------------ 60 61 If you want to improve this program make a pull request to the [repo](https://github.com/lawrencewoodman/roveralls) on github. Please put any pull requests in a separate branch to ease integration and add a test to prove that it works. If you find a bug, please report it at the project's [issues tracker](https://github.com/lawrencewoodman/roveralls/issues) also on github. 62 63 64 Licence 65 ------- 66 Copyright (C) 2016, Lawrence Woodman <lwoodman@vlifesystems.com> 67 68 This software is licensed under an MIT Licence. Please see the file, LICENCE.md, for details.