mirror of
https://github.com/christianselig/apollo-backend
synced 2024-12-27 00:35:28 +00:00
f9b9c595cf
* some tests * more tests * tidy up go.mod * more tests * add postgres * beep * again * Set up schema * fix device test
19 lines
435 B
Makefile
19 lines
435 B
Makefile
BREW_PREFIX ?= $(shell brew --prefix)
|
|
DATABASE_URL ?= "postgres://$(USER)@localhost/apollo_test?sslmode=disable"
|
|
|
|
test:
|
|
@DATABASE_URL=$(DATABASE_URL) go test -race -v -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
|