apollo-backend/Makefile

20 lines
432 B
Makefile
Raw Normal View History

BREW_PREFIX ?= $(shell brew --prefix)
DATABASE_URL ?= "postgres://$(USER)@localhost/apollo_test?sslmode=disable"
test:
2022-07-15 16:19:27 +00:00
@DATABASE_URL=$(DATABASE_URL) go test -race -timeout 1s ./...
test-setup: $(BREW_PREFIX)/bin/migrate
migrate -path migrations/ -database $(DATABASE_URL) up
build:
@go build ./cmd/apollo
lint:
@golangci-lint run
$(BREW_PREFIX)/bin/migrate:
@brew install golang-migrate
.PHONY: all build deps lint test