Skip to content

Commit

Permalink
Add gorm and postgres test conteiner initial path
Browse files Browse the repository at this point in the history
  • Loading branch information
yasuflatland-lf committed Jul 4, 2024
1 parent 1334f09 commit 37a8c09
Show file tree
Hide file tree
Showing 8 changed files with 446 additions and 478 deletions.
5 changes: 3 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
frontend/.idea
backend/.idea

/**/.idea
/**/.env
Empty file added backend/.env.example
Empty file.
39 changes: 39 additions & 0 deletions backend/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
# Include all env file and extract as environment valuables entire this Makefile.
include .env
.EXPORT_ALL_VARIABLES:

RED=`tput setaf 1`
GREEN=`tput setaf 2`
WHITE=`tput setaf 7`
RESET=`tput sgr0`

ORG_PATH := ${CURDIR}

ENVS = \
export TF_VAR_HOME=$(HOME);

.PHONY: gen
gen: ## Generate GraphQL implementations
printf "${GREEN} Clean up files\n\n"; \
cd ./graph; rm -fR generated.go resolver.go schema.resolvers.go model; cd ${ORG_PATH} ; \
printf "${GREEN} Update gqlgen\n\n"; \
go get github.com/99designs/gqlgen@latest; cd ${ORG_PATH} ; \
printf "${GREEN} Generating GraphQL related sources\n\n"; \
go get github.com/99designs/gqlgen@latest; cd ${ORG_PATH} ; \
go run github.com/99designs/gqlgen generate; cd ${ORG_PATH}; \
printf "${GREEN}Done\n"; \

.PHONY: fmt
fmt: ## Format code
go fmt ./...; \
printf "${GREEN} Code formatted.\n\n"; \

.PHONY: test
test: ## Run tests
printf "${GREEN}Run all tests\n\n"; \
${ENV} go test -v ./...;
printf "${GREEN}Done\n"; \

.PHONY: help
help: ## Display this help screen
@grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | sed s/Makefile:// | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-20s\033[0m %s\n", $$1, $$2}'
Loading

0 comments on commit 37a8c09

Please sign in to comment.