From 3154c686e0bff1d0cbdc8e483197d12d716ffca0 Mon Sep 17 00:00:00 2001 From: Joona Hoikkala Date: Mon, 28 Nov 2016 13:20:19 +0200 Subject: [PATCH] Skip main in tests for meaningful cover stats --- .travis.yml | 4 ++-- main.go | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index 27011f5..91e4e43 100644 --- a/.travis.yml +++ b/.travis.yml @@ -11,5 +11,5 @@ before_install: script: - go vet - golint -set_exit_status - - go test -race -v - - $HOME/gopath/bin/goveralls -service=travis-ci + - go test -race -v -tags test -covermode=atomic -coverprofile=profile.cov + - $HOME/gopath/bin/goveralls -coverprofile=profile.cov -service=travis-ci diff --git a/main.go b/main.go index 69d73cb..b7f4dda 100644 --- a/main.go +++ b/main.go @@ -1,3 +1,5 @@ +//+build !test + package main import (