/
Makefile
41 lines (32 loc) · 903 Bytes
/
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
40
41
.PHONY: ci
ci: tools test lint generate fmt tidy check_repository_unchanged
.PHONY: check_repository_unchanged
check_repository_unchanged:
_tools/check_repository_unchanged.sh
.PHONY: generate
generate:
go generate ./...
.PHONY: fmt
fmt:
gosimports -l -w ./
.PHONY: test
test:
go test -race ./...
.PHONY: recreate-emulator
recreate-emulator:
sudo docker-compose -f ./docker-compose-integration.yml rm -f -s -v
sudo docker-compose -f ./docker-compose-integration.yml up -d
.PHONY: test-integration
test-integration:
FIRESTORE_EMULATOR_HOST=localhost:8200 go test -tags=test_integration -v ./...
.PHONY: tidy
tidy:
go mod tidy
.PHONY: lint
lint:
go vet ./...
golangci-lint run ./...
.PHONY: tools
tools:
go install github.com/golangci/golangci-lint/cmd/golangci-lint@v1.51.1
go install github.com/rinchsan/gosimports/cmd/gosimports@v0.3.5 # https://github.com/golang/go/issues/20818