Feat: add workflows
Some checks failed
Go test / run-go-vet (push) Successful in 6s
Go test / run-go-test (push) Failing after 1m30s

This commit is contained in:
2025-12-08 23:18:19 +08:00
parent f191aef810
commit 1dc1f2bf52
3 changed files with 29 additions and 8 deletions

View File

@@ -9,22 +9,22 @@ 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
$(TARGET): $(SOURCE)
$(GO_ENV) go build -o $@