From 32cd46e060f5436f7f64252ecf0df69df1eb07fe Mon Sep 17 00:00:00 2001 From: Martin Linkhorst Date: Fri, 10 Jan 2020 17:30:21 +0100 Subject: [PATCH] chore: add Makefile and prettify test output --- .travis.yml | 5 +++-- Makefile | 12 ++++++++++++ 2 files changed, 15 insertions(+), 2 deletions(-) create mode 100644 Makefile diff --git a/.travis.yml b/.travis.yml index a92b0c8f..74382687 100644 --- a/.travis.yml +++ b/.travis.yml @@ -13,9 +13,10 @@ env: - GO111MODULE=on install: +- go get github.com/mfridman/tparse - go get github.com/mattn/goveralls - go get github.com/lawrencewoodman/roveralls script: -- roveralls -- goveralls -coverprofile=roveralls.coverprofile -service=travis-ci +- make check +- make coveralls diff --git a/Makefile b/Makefile new file mode 100644 index 00000000..5ccaaffc --- /dev/null +++ b/Makefile @@ -0,0 +1,12 @@ +TPARSE := $(shell tparse --version 2>/dev/null) + +check: +ifdef TPARSE + go test ./... -race -cover -json | tparse -all +else + go test ./... -race -cover +endif + +coveralls: + roveralls + goveralls -coverprofile=roveralls.coverprofile -service=travis-ci