-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathMakefile
More file actions
37 lines (29 loc) · 801 Bytes
/
Makefile
File metadata and controls
37 lines (29 loc) · 801 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
BIN = target/db-auth-gateway
SRC = $(shell find . -type f -name '*.go')
$(BIN): $(SRC)
@mkdir -p target
@go build -o $@ cmd/main.go
test: $(SRC) reset_mock
@go test ./...
e2e: $(SRC) $(BIN) reset_mock
@go test -tags=e2e ./test/...
start_mock: $(SRC)
@-docker-compose down
@docker-compose build
@docker-compose up -d
reset_mock:
@docker-compose stop mock
@docker-compose rm -f -v mock
@docker-compose up -d
@sleep 2
lint: $(SRC)
@go mod tidy
@gofumpt -s -l -w $^
@gci -w $^
@golangci-lint run --timeout 5m0s --enable-all \
-D gochecknoglobals -D exhaustivestruct -D wrapcheck -D interfacer -D maligned -D scopelint -D golint -D gomnd -D paralleltest ./...
clean:
@-rm -Rf target/*
@go clean -testcache
@-docker-compose down
.PHONY: test e2e start_mock reset_mock lint clean