From 6aced97056e3fcf5a7341d4450dfce811c8675a3 Mon Sep 17 00:00:00 2001 From: Hau Nguyen Date: Tue, 16 Aug 2022 00:51:21 +0700 Subject: [PATCH] chore: use my own go-test-color --- .gitignore | 1 + Makefile | 18 +++++++++++++----- 2 files changed, 14 insertions(+), 5 deletions(-) diff --git a/.gitignore b/.gitignore index 14a808d..ce03dee 100644 --- a/.gitignore +++ b/.gitignore @@ -12,6 +12,7 @@ # Go coverage.out +vendor # GoReleaser dist diff --git a/Makefile b/Makefile index 092ab58..c21d8dc 100644 --- a/Makefile +++ b/Makefile @@ -1,14 +1,22 @@ -.PHONY: all test coverage-cli coverate-html lint +.PHONY: all test test-color coverage coverage-cli coverate-html lint -all: test lint +all: test-color lint + go mod tidy test: - go test -race -coverprofile=coverage.out ./... + go test -race -failfast ./... -coverage-cli: test +test-color: + go install github.com/haunt98/go-test-color@latest + go-test-color -race -failfast ./... + +coverage: + go test -coverprofile=coverage.out ./... + +coverage-cli: coverage go tool cover -func=coverage.out -coverage-html: test +coverage-html: coverage go tool cover -html=coverage.out lint: