test me pls
Some checks failed
continuous-integration/drone/push Build is failing
continuous-integration/drone/pr Build is failing

This commit is contained in:
2022-12-04 22:55:22 +04:00
parent bc5b2b039a
commit bd4b135e17
11 changed files with 133 additions and 33 deletions

View File

@@ -1,22 +1,24 @@
export DOCKER_BUILDKIT := 1
GOPATH := $(shell go env GOPATH)
export PATH := $(PATH):$(GOPATH)/bin
PROTOC_GEN_GO := $(GOPATH)/bin/protoc-gen-go
ARCH := $(shell uname -m)
GITREV := $(shell git describe --always --dirty=-dirty)
APPNAME := mfer
export DOCKER_IMAGE_CACHE_DIR := $(HOME)/Library/Caches/Docker/$(APPNAME)-$(ARCH)
GOLDFLAGS += -X main.Version=0.1.0
GOLDFLAGS += -X main.Gitrev=$(GITREV)
GOFLAGS := -ldflags "$(GOLDFLAGS)"
default: run
default: test
run: ./mfer.cmd
./$<
./$< gen --ignore-dotfiles
test:
test: fmt
go test -v --timeout 3s ./...
$(PROTOC_GEN_GO):
@@ -29,7 +31,7 @@ devprereqs:
which gofumpt || go install -v mvdan.cc/gofumpt@latest
which golangci-lint || go install -v github.com/golangci/golangci-lint/cmd/golangci-lint@latest
mfer.cmd: $(PROTOC_GEN_GO) mfer/*.go internal/*/*.go cmd/*/*.go
mfer.cmd: mfer/*.go internal/*/*.go cmd/*/*.go
protoc --version
cd mfer && go generate .
make test
@@ -48,5 +50,10 @@ lint:
golangci-lint run
sh -c 'test -z "$$(gofmt -l .)"'
dockerbuild:
docker:
bash -x bin/docker-prereqs.sh
docker build .
godoc:
open http://127.0.0.1:6060
godoc -http=:6060