2021-01-01 23:36:31 +03:00
|
|
|
all: fmt tidy lint test
|
2020-12-23 00:43:24 +03:00
|
|
|
build:
|
|
|
|
go build
|
|
|
|
|
|
|
|
fmt:
|
|
|
|
go fmt ./...
|
|
|
|
|
2021-01-01 23:36:31 +03:00
|
|
|
# ignoring e2e tests
|
2020-12-23 00:43:24 +03:00
|
|
|
test:
|
2021-01-01 23:36:31 +03:00
|
|
|
go test -covermode atomic -coverprofile=profile.out `go list ./... | grep -v e2e`
|
2020-12-23 00:43:24 +03:00
|
|
|
|
|
|
|
tidy:
|
|
|
|
go mod tidy
|
|
|
|
|
|
|
|
GOLANGCI_LINT = $(shell pwd)/bin/golangci-lint
|
|
|
|
golangci-lint:
|
|
|
|
@[ -f $(GOLANGCI_LINT) ] || { \
|
|
|
|
set -e ;\
|
|
|
|
curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(shell dirname $(GOLANGCI_LINT)) v1.29.0 ;\
|
|
|
|
}
|
|
|
|
|
|
|
|
lint: golangci-lint ## Run golangci-lint linter
|
|
|
|
$(GOLANGCI_LINT) run
|
|
|
|
|
2021-01-01 23:36:31 +03:00
|
|
|
.PHONY: e2e
|
|
|
|
# export GITHUB_AUTH_TOKEN with personal access token to run the e2e
|
|
|
|
e2e:
|
|
|
|
ginkgo test -v -p ./e2e/...
|
|
|
|
|