build: uses gotestsum for testing

This commit is contained in:
Marvin Preuss 2022-03-23 13:44:46 +01:00
parent a9c5c1f2cc
commit 59613e6475
2 changed files with 24 additions and 3 deletions

4
.gitignore vendored
View File

@ -1,2 +1,6 @@
dist/*
.envrc
coverage.out
report.xml
.gobin/*
.cache/*

View File

@ -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: