generated from evrone/go-clean-template
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
42 lines (31 loc) · 1.08 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
40
41
include .env.example
export
compose-up: ### Run docker-compose
docker-compose up --build -d postgres app
.PHONY: compose-up
compose-up-integration-test: ### Run docker-compose with integration test
docker-compose up --build --abort-on-container-exit --exit-code-from integration
.PHONY: compose-up-integration-test
compose-down: ### Down docker-compose
docker-compose down --remove-orphans
.PHONY: compose-down
swag-v1: ### swag init
swag init -g cmd/server/main.go -o ./docs/server
docker-rm-volume: ### remove docker volume
docker volume rm gophkeeper_pg-data
.PHONY: docker-rm-volume
linter-golangci: ### check by golangci linter
golangci-lint run
.PHONY: linter-golangci
linter-hadolint: ### check by hadolint linter
git ls-files --exclude='Dockerfile*' --ignored | xargs hadolint
.PHONY: linter-hadolint
linter-dotenv: ### check by dotenv linter
dotenv-linter
.PHONY: linter-dotenv
test: ### run test
go test -v -cover -race ./internal/...
.PHONY: test
integration-test: ### run integration-test
go clean -testcache && go test -v ./integration-test/...
.PHONY: integration-test