diff --git a/.gitignore b/.gitignore index fa5eb67..949648d 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,6 @@ dist/* .envrc +coverage.out +report.xml +.gobin/* +.cache/* diff --git a/Makefile b/Makefile index b4cd93f..fa8bced 100644 --- a/Makefile +++ b/Makefile @@ -1,11 +1,28 @@ GO := go -GORELEASER := $(GO) run github.com/goreleaser/goreleaser@v1.3.1 -GOLANGCI_LINT := $(GO) run github.com/golangci/golangci-lint/cmd/golangci-lint@v1.44.2 +ROOT_DIR := $(shell dirname $(realpath $(firstword $(MAKEFILE_LIST)))) +CACHE_DIR := $(ROOT_DIR)/.cache + +export GOBIN := $(ROOT_DIR)/.gobin +export PATH := $(GOBIN):$(PATH) + +GORELEASER := $(GO) run github.com/goreleaser/goreleaser@v1.7.0 +GOLANGCI_LINT := $(GO) run github.com/golangci/golangci-lint/cmd/golangci-lint@v1.45.0 + +GOTESTSUM_URL := gotest.tools/gotestsum@v1.7.0 +GOTESTSUM := $(GO) run $(GOTESTSUM_URL) .PHONY: test test: - $(GO) test -count=1 -v ./... + $(GOTESTSUM) \ + --junitfile report.xml \ + -- \ + -race \ + -cover \ + -coverprofile=coverage.out \ + -tags=integration \ + ./... \ + -timeout=120m .PHONY: lint lint: