-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
53 lines (38 loc) · 962 Bytes
/
Makefile
File metadata and controls
53 lines (38 loc) · 962 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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
MAKEFLAGS += --no-print-directory
CONFIG :=
RACE_FLAG :=
TEST_NAME :=
ifneq ($(cfg),)
CONFIG := CONFIG_OVERLOAD_FILE=.env.$(cfg)
endif
ifeq ($(race),1)
RACE_FLAG := -race
endif
ifneq ($(test),)
TEST_NAME := -run $(test)
endif
.PHONY: test.all
test.all: test.gateway test.services test.bus
test.gateway:
@$(MAKE) test.run TEST_PATH=./internal/api/gateway
test.services:
@$(MAKE) test.run TEST_PATH=./internal/services/...
test.bus:
@$(MAKE) test.run TEST_PATH=./internal/platform/bus
test.%:
@$(MAKE) test.run TEST_PATH=./internal/services/modules/$*
test.run:
@echo "=== Test: $(TEST_PATH)"
$(CONFIG) go test $(RACE_FLAG) -count=1 -v -failfast $(TEST_PATH) $(TEST_NAME)
lint.all:
@echo "=== Lint: all"
golangci-lint run ./internal/...
fmt.fu:
@echo "=== Format: gofumpt"
gofumpt -w .
fmt.imports:
@echo "=== Format: goimports"
goimports -w .
gen.events:
@echo "=== Gen: events"
go generate ./internal/platform/events/generate.go