-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
42 lines (29 loc) · 988 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
42
.PHONY: clean test
run:
docker-compose up -d postgres redis
docker-compose up --build sharechat
stop:
docker-compose down
build:
go build -ldflags="-s -w" -o bin/sharechat cmd/sharechat/main.go
go build -ldflags="-s -w" -o bin/memorychat cmd/memorychat/main.go
clean:
rm -rf ./bin Gopkg.lock *.out
int-test:
@go test -race -v ./sharechat/... -tags=int
unit-test:
@go test -race -v ./sharechat/... -tags=unit
e2e-test:
@go test -v ./test/e2e/... -tags=e2e
unit-coverage:
@go test -coverprofile=unit_coverage.out ./sharechat/... -coverpkg=./sharechat/... -tags=unit
view-coverage: unit-coverage
@go tool cover -html=unit_coverage.out
lint:
@golangci-lint run
migration:
goose -dir=migrations create $(file) $(dialect)
goose-up:
goose -dir=migrations postgres "user=user dbname=public password=password host=localhost sslmode=disable" up
goose-down:
goose -dir=migrations postgres "user=user dbname=public password=password host=localhost sslmode=disable" down