-
Notifications
You must be signed in to change notification settings - Fork 37
/
Makefile
39 lines (28 loc) · 1.07 KB
/
Makefile
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
.PHONY: build test build-docker run test-one
build:
CGO_ENABLED=0 GOOS=linux go build -o ./playground-mono
format:
go fmt ./...
run:
go run main.go
test:
go test -v -count=1 -p=1 ./internal/tests/integration...
test-one:
go test -v -race -count=1 --run $(TEST_FUNC) ./internal/tests/integration...
unittest:
go test -race -count=1 ./internal/...
unittest-one:
go test -v -race -count=1 --run $(TEST_FUNC) ./internal/...
GOLANGCI_LINT_VERSION := 1.60.1
lint: check-golangci-lint
golangci-lint run ./...
check-golangci-lint:
@if ! command -v golangci-lint > /dev/null || ! golangci-lint version | grep -q "$(GOLANGCI_LINT_VERSION)"; then \
echo "Required golangci-lint version $(GOLANGCI_LINT_VERSION) not found."; \
echo "Please install golangci-lint version $(GOLANGCI_LINT_VERSION) with the following command:"; \
echo "curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin v1.60.1"; \
exit 1; \
fi
push-binary-remote:
$(MAKE) build
scp -i ${SSH_PEM_PATH} ./playground-mono ubuntu@${REMOTE_HOST}:.