-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathMakefile
More file actions
54 lines (38 loc) · 1.11 KB
/
Makefile
File metadata and controls
54 lines (38 loc) · 1.11 KB
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
GOFMT_FILES?=$$(find . -name '*.go')
build:
go build ./...
clean:
go clean
gitclean:
git clean -xfd
git submodule foreach --recursive git clean -xfd
install_lint:
go install github.com/golangci/golangci-lint/cmd/golangci-lint@v1.51.0
check-modtidy:
go mod tidy
git diff --exit-code -- go.mod go.sum
lint:
@echo "==> Checking that code complies with golangci-lint requirements..."
golangci-lint --version
golangci-lint run -E gofmt -E goconst -E gocritic --timeout 5m
fmt:
gofmt -w -s $(GOFMT_FILES)
fmt-check:
@echo "==> Checking that code complies with gofmt requirements..."
gofmt -l -s $(GOFMT_FILES)
vet:
@echo "==> Checking that code complies with go vet requirements..."
go vet $$(go list ./...)
test: build
go test -race ./...
test-database: build
go test ./components/connections/database/... -v
test-integration: build
go test -v ./indexer/tests/...
test-components: build
go test -v ./components/...
# Docker
test-database-up:
docker-compose -f ./indexer/tests/docker-compose.yml up -d
test-database-services:
docker-compose -f tests_docker/test_database.yml up --abort-on-container-exit