diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index b87b0985..5269dd00 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -121,7 +121,7 @@ jobs: - run: dockerize -wait tcp://localhost:8088 -timeout 5m - run: dockerize -wait tcp://localhost:8181 -timeout 5m - run: docker logs keycloak - - run: make test/all/gotestfmt + - run: make test/all - run: make test/coverage - run: go install github.com/mattn/goveralls@latest - env: diff --git a/.gitignore b/.gitignore index 1d140a0f..73ceee9f 100644 --- a/.gitignore +++ b/.gitignore @@ -139,3 +139,4 @@ _dist/ coverage.html bundle.tar.gz *.log +junit.xml diff --git a/Makefile b/Makefile index b0319636..9b5a36cf 100644 --- a/Makefile +++ b/Makefile @@ -31,7 +31,7 @@ HAS_GIT := $(shell command -v git;) HAS_GOLANGCI_LINT := $(shell command -v golangci-lint;) HAS_CURL:=$(shell command -v curl;) HAS_MOCKGEN:=$(shell command -v mockgen;) -HAS_GOTESTFMT:=$(shell command -v gotestfmt;) +HAS_GOTESTSUM:=$(shell command -v gotestsum;) HAS_FIELDALIGNMENT:=$(shell command -v fieldalignment;) .DEFAULT_GOAL := code/lint @@ -96,11 +96,11 @@ endif .PHONY: test/all test/all: setup/dep/install - $(GO) test --tags=unit,integration -v -coverpkg=./pkg/... -covermode=count -coverprofile=c.out.tmp ./pkg/... + gotestsum --junitfile junit.xml --format testname --format-hide-empty-pkg -- --tags=unit,integration -coverpkg=./pkg/... -covermode=count -coverprofile=c.out.tmp ./pkg/... -.PHONY: test/all/gotestfmt -test/all/gotestfmt: setup/dep/install - $(GO) test -json --tags=unit,integration -v -coverpkg=./pkg/... -covermode=count -coverprofile=c.out.tmp ./pkg/... | tee /tmp/gotest.log | gotestfmt +.PHONY: test/all/original +test/all/original: setup/dep/install + $(GO) test --tags=unit,integration -v -coverpkg=./pkg/... -covermode=count -coverprofile=c.out.tmp ./pkg/... .PHONY: test/unit test/unit: setup/dep/install @@ -184,9 +184,9 @@ ifndef HAS_MOCKGEN @echo "=> Installing mockgen tool" go install github.com/golang/mock/mockgen@v1.6.0 endif -ifndef HAS_GOTESTFMT - @echo "=> Installing gotestfmt tool" - go install github.com/gotesttools/gotestfmt/v2/cmd/gotestfmt@v2.4.1 +ifndef HAS_GOTESTSUM + @echo "=> Installing gotestsum tool" + go install gotest.tools/gotestsum@v1.10.1 endif ifndef HAS_FIELDALIGNMENT @echo "=> Installing fieldalignment tool"