From 6d198b8a13ddd90d5470abd07b3acebc5e69fbf9 Mon Sep 17 00:00:00 2001 From: Mark Ryan Date: Tue, 2 Jan 2018 16:21:01 +0000 Subject: [PATCH] Compute coverage statistics for unit tests in Travis builds This commit enables unit test coverage computation in Travis CI builds. Going forward, builds that decrease the unit test coverage by more than 1.0% will fail. Signed-off-by: Mark Ryan --- .travis.yml | 3 ++- README.md | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 36f4b30f08..03a39421fd 100644 --- a/.travis.yml +++ b/.travis.yml @@ -14,8 +14,9 @@ matrix: before_install: - go get github.com/alecthomas/gometalinter - gometalinter --install + - go get github.com/mattn/goveralls script: - go env - - go test -v ./... + - $GOPATH/bin/goveralls -v -service=travis-ci - gometalinter --tests --vendor --disable-all --enable=misspell --enable=vet --enable=ineffassign --enable=gofmt --enable=gocyclo --cyclo-over=15 --enable=golint --enable=errcheck --enable=deadcode ./... diff --git a/README.md b/README.md index 0e8e2d23ab..2bb92f0c47 100644 --- a/README.md +++ b/README.md @@ -3,6 +3,7 @@ [![Go Report Card](https://goreportcard.com/badge/github.com/intel/govmm)](https://goreportcard.com/report/github.com/intel/govmm) [![Build Status](https://travis-ci.org/intel/govmm.svg?branch=master)](https://travis-ci.org/intel/govmm) [![GoDoc](https://godoc.org/github.com/intel/govmm/qemu?status.svg)](https://godoc.org/github.com/intel/govmm/qemu) +[![Coverage Status](https://coveralls.io/repos/github/intel/govmm/badge.svg?branch=master)](https://coveralls.io/github/intel/govmm?branch=master) Virtual Machine Manager for Go (govmm) is a suite of packages that provide Go APIs for creating and managing virtual machines. There's