-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathmakefile
More file actions
30 lines (27 loc) · 695 Bytes
/
makefile
File metadata and controls
30 lines (27 loc) · 695 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
# Go commands
GOCMD=go
GOBUILD=$(GOCMD) build
GOTEST=$(GOCMD) test
GOGET=$(GOCMD) get
EXAMPLES = $(shell find example -type d -not -path '*/\.*')
# Test and integration tag
INTEGRATIONTAGS=integration
all: setup build
setup:
@echo "Setting up the Go environment"
$(GOGET) -v -t -d ./...
test:
@echo "Running the Go unit tests"
$(GOTEST) -v ./...
integration-test:
@echo "Running the Go integration tests"
$(GOTEST) -v -tags=$(INTEGRATIONTAGS) ./...
build-example:
@echo "Building examples"
@for dir in $(shell find ./example -type d); do \
(cd $$dir && go build .); \
done
generate-mock:
mockery --all --keeptree
-rm -r mocks/internal_mock
mv mocks/internal mocks/internal_mock