Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Docs:Update Readme #134

Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions .github/workflows/go-template-ci.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
name: Go-Template CI Master - Test

on:
pull_request:
pull_request_target:
branches:
- master
push:
branches:
- master
- '*'


jobs:
Expand All @@ -19,9 +19,9 @@ jobs:
fetch-depth: 0
- uses: actions/setup-python@v3
- name: Install Go
uses: actions/setup-go@v3
uses: actions/setup-go@v5
with:
go-version: 1.19
go-version: '1.22'
- name: Get branch name
id: vars
run: echo ::set-output name=branch::${{ github.event.pull_request.head.ref }}
Expand Down Expand Up @@ -67,7 +67,7 @@ jobs:
steps:
- uses: actions/checkout@v3
- name: Install Go
uses: actions/setup-go@v3
uses: actions/setup-go@v5
with:
go-version: 1.19
go-version: 1.22
- uses: golangci/golangci-lint-action@v3
22 changes: 19 additions & 3 deletions README.MD
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,16 @@ Using go-template requires having Go 1.7 or above. Once you download go-template
github.com/volatiletech/sqlboiler \
github.com/99designs/gqlgen
```
For Go 1.16 or above, you need to install sqlboiler using

```
go install github.com/volatiletech/sqlboiler/v4@latest
go install github.com/volatiletech/sqlboiler/v4/drivers/sqlboiler-psql@latest
```
For Go 1.18 and above install the sql-migrate using
```
go install github.com/rubenv/sql-migrate/...@latest
```
4. To run all the migrations using the script setup-local.sh as follows `./scripts/setup-local.sh`.

5. Generate the graphql models using `gqlgen generate`
Expand Down Expand Up @@ -177,7 +186,6 @@ go-template/
└──.env.local # a sample .env file for reference
└──.env.base # a base .env file should be included in all environments
└──.pre-commit-config.yaml # config to run pre-commit utility
└──dbconfig.yml
└──docker-compose.*.yml # docker-compose file corresponding to the state of project (local, prod, test)
└──docker-compose.yml # docker-compose file which serves as a base to other docker-compose files
└──generate-modules.sh # script to generate modules
Expand All @@ -195,7 +203,12 @@ generate your database models
```
sqlboiler psql --no-hooks
```

# Seed your Database
For seeding Your database models use
```
go run cmd/seeder/exec/seed.go
```
Note: We have Seeder directory because we are using it while building docker image for application
# graphQL

generate the graphql models from the database schema
Expand Down Expand Up @@ -300,7 +313,10 @@ go test -cover
```

## Generate mocks

Install Mockgen Using
```
go install github.com/gleisonmv/mockgen@latest
```
Sample command to generate mocks

```
Expand Down
Loading