-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
46 lines (33 loc) · 918 Bytes
/
Makefile
File metadata and controls
46 lines (33 loc) · 918 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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
.PHONY: build run test test-coverage clean docker-up docker-down docker-restart lint fmt deps
build:
go build -o bin/server cmd/server/main.go
run:
go run cmd/server/main.go
test:
go test -v -race -coverprofile=coverage.out ./...
test-coverage:
go test -v -race -coverprofile=coverage.out ./...
go tool cover -html=coverage.out -o coverage.html
clean:
rm -rf bin/
rm -f coverage.out coverage.html
docker-up:
docker-compose up --build
docker-down:
docker-compose down -v
docker-restart:
docker-compose down
docker-compose up --build
migrate-up:
migrate -path migrations -database "postgresql://user:password@localhost:5432/pr_reviewer?sslmode=disable" up
migrate-down:
migrate -path migrations -database "postgresql://user:password@localhost:5432/pr_reviewer?sslmode=disable" down
lint:
golangci-lint run
fmt:
gofmt -s -w .
goimports -w .
deps:
go mod download
go mod verify
go mod tidy