-
Notifications
You must be signed in to change notification settings - Fork 20
Expand file tree
/
Copy pathMakefile
More file actions
31 lines (23 loc) · 831 Bytes
/
Makefile
File metadata and controls
31 lines (23 loc) · 831 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
# Set the default goal
.DEFAULT_GOAL := test
# Active module mode, as we use Go modules to manage dependencies
export GO111MODULE=on
SOURCES := $(shell find . -name '*.go')
GOPATH=$(shell go env GOPATH)
GOBIN=$(GOPATH)/bin
.PHONY: test
## Runs both unit and integration tests
test: unit-tests
.PHONY: unit-tests
## Runs unit tests with code coverage enabled
unit-tests: $(SOURCES)
go test -v -short -race -timeout 300s -coverprofile=coverage.txt ./...
.PHONY: e2e-tests
## Runs e2e tests
integrations-tests: $(SOURCES)
go test -v -race -timeout 30s -coverprofile=coverage.txt ./tests/integrations
$(GOBIN)/golangci-lint:
curl -sfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh| sh -s -- -b $(GOBIN) v1.46.0
.PHONY: lint
lint: $(GOBIN)/golangci-lint
$(GOBIN)/golangci-lint run --timeout 5m