-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathMakefile
45 lines (37 loc) · 1.14 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
42
43
44
45
.PHONY: install-migrate
## install-migrate: installs the golang migrate binary
install-migrate:
./scripts/install_migrate.sh
.PHONY: up
## up: Runs all the containers listed in the docker-compose.yml file
up:
docker-compose up --build -d
.PHONY: down
## down: Shut down all the containers listed in the docker-compose.yml file
down:
docker-compose down
.PHONY: linter
## linter: Runs the golangci-lint command
linter:
golangci-lint run --enable=golint --enable=godot ./...
.PHONY: test
## test: Runs all the test suite of the project
test:
go test -v -race ./...
.PHONY: unit-test
## unit-test: Runs the tests with the short flag
unit-test:
go test -v -short -race ./...
.PHONY: int-test
## int-test: Runs the integration tests in a docker environment
int-test:
docker-compose run --entrypoint=make seeder test
.PHONY: migrate
## migrate: Runs the migrations
migrate:
migrate -source file://db/migrations -database "postgres://${DB_USER}:${DB_PASSWORD}@${DB_HOST}:${DB_PORT}/${DB_NAME}?sslmode=disable" up
.PHONY: help
## help: Prints this help message
help:
@echo "Usage:"
@sed -n 's/^##//p' ${MAKEFILE_LIST} | column -t -s ':' | sed -e 's/^/ /'