forked from gothinkster/realworld-starter-kit
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
30 lines (20 loc) · 734 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
include .env
.PHONY: migrate-up migrate-down migrate-force migrate-version migrate-new test test-ci test-spec start-db
migrate-up:
@migrate -database ${POSTGRES_URL} -path ${MIGRATION_PATH} up
migrate-down:
@migrate -database ${POSTGRES_URL} -path ${MIGRATION_PATH} down ${n}
migrate-force:
@migrate -database ${POSTGRES_URL} -path ${MIGRATION_PATH} force ${v}
migrate-version:
@migrate -database ${POSTGRES_URL} -path ${MIGRATION_PATH} version
migrate-new:
@migrate create -ext sql -dir ${MIGRATION_PATH} -seq ${name}
test:
@go test -failfast -parallel 2 ./...
test-ci:
@go test -failfast -cover -v -parallel 2 ./...
test-spec:
APIURL=${API_URL} bash ./conduit/spec/run-api-tests.sh
start-db:
@docker-compose up -d