Feat: add workflows
This commit is contained in:
20
Makefile
20
Makefile
@@ -9,22 +9,30 @@ TARGET := backend
|
||||
|
||||
all: swagger docker
|
||||
|
||||
swagger:
|
||||
$(SWAG) fmt
|
||||
$(SWAG) init -o docs -g cmds/serve.go -pdl 1
|
||||
|
||||
docker: $(TARGET)
|
||||
$(DOCKER) compose up -d --force-recreate --build backend
|
||||
|
||||
$(TARGET): $(SOURCE)
|
||||
$(GO_ENV) go build -o $@
|
||||
|
||||
install:
|
||||
$(GO_ENV) go install
|
||||
|
||||
test:
|
||||
test: docker
|
||||
go test -v ./tests -count=1
|
||||
|
||||
postgres:
|
||||
$(DOCKER) compose exec postgres psql \
|
||||
postgres://go2025:go2025@postgres:5432/go2025?sslmode=disable
|
||||
|
||||
swagger:
|
||||
$(SWAG) fmt
|
||||
$(SWAG) init -o docs -g cmds/serve.go -pdl 1
|
||||
test-quiet: docker-quiet
|
||||
go test -v ./tests -count=1
|
||||
|
||||
$(TARGET): $(SOURCE)
|
||||
$(GO_ENV) go build -o $@
|
||||
docker-quiet: $(TARGET)
|
||||
$(DOCKER) compose up -d --force-recreate --build backend \
|
||||
--quiet-build --quiet-pull
|
||||
sleep 5
|
||||
|
||||
Reference in New Issue
Block a user