diff --git a/.gitignore b/.gitignore index 7a92711..a0f519f 100644 --- a/.gitignore +++ b/.gitignore @@ -16,3 +16,4 @@ *-kubeconfig dist +unit-tests.xml \ No newline at end of file diff --git a/Makefile b/Makefile index e5f1692..4b23e17 100644 --- a/Makefile +++ b/Makefile @@ -4,8 +4,9 @@ export DOCKERHUB_ORG ?= mhrabovcin export GIT_TREE_STATE ?= .PHONY: test -test: - go test ./... +test: tools.gotestsum + gotestsum --format pkgname --junitfile unit-tests.xml -- -coverprofile=cover.out ./... && \ + go tool cover -func=cover.out .PHONY: lint lint: @@ -44,3 +45,7 @@ release-snapshot: --clean \ --parallelism=$(GORELEASER_PARALLELISM) \ --timeout=60m + +.PHONY: tools.gotestsum +tools.gotestsum: + go install gotest.tools/gotestsum@v1.10.0