diff --git a/Makefile b/Makefile index 2bf202b..3989d45 100644 --- a/Makefile +++ b/Makefile @@ -1,7 +1,8 @@ # Go parameters GOCMD=go +GOVERSION=1.25 MODULENAME=github.com/h44z/wg-portal -GOFILES:=$(shell go list ./... | grep -v /vendor/) +GOFILES=$(shell go list ./... | grep -v /vendor/) BUILDDIR=dist BINARIES=$(subst cmd/,,$(wildcard cmd/*)) IMAGE=h44z/wg-portal @@ -51,6 +52,11 @@ format: .PHONY: test test: test-vet test-race +#> test-in-docker: Run tests in Docker (for non-Linux environments e.g. MacOS) +.PHONY: test-in-docker +test-in-docker: + docker run --rm -u $(shell id -u):$(shell id -g) -e HOME=/tmp -v $(PWD):/app -w /app golang:$(GOVERSION) make test + #< test-vet: Static code analysis .PHONY: test-vet test-vet: build-dependencies