mirror of https://github.com/go-gorm/gorm.git
Update issue template
This commit is contained in:
parent
7e1fa4a44d
commit
90f817db29
|
@ -1,38 +1,5 @@
|
|||
Your issue may already be reported! Please search on the [issue track](https://github.com/go-gorm/gorm/issues) before creating one.
|
||||
|
||||
### What version of Go are you using (`go version`)?
|
||||
To report a bug, your issue *have to* include an [GORM playground pull request link](https://github.com/go-gorm/playground), for general questions, please delete below line.
|
||||
|
||||
|
||||
### Which database and its version are you using?
|
||||
|
||||
|
||||
### Please provide a complete runnable program to reproduce your issue. **IMPORTANT**
|
||||
|
||||
Need to runnable with [GORM's docker compose config](https://github.com/go-gorm/gorm/blob/master/tests/docker-compose.yml) or please provides your config.
|
||||
|
||||
```go
|
||||
package main
|
||||
|
||||
import (
|
||||
"gorm.io/gorm"
|
||||
"gorm.io/driver/sqlite"
|
||||
// "gorm.io/driver/mysql"
|
||||
// "gorm.io/driver/postgres"
|
||||
// "gorm.io/driver/sqlserver"
|
||||
)
|
||||
|
||||
func main() {
|
||||
db, err := gorm.Open(sqlite.Open(filepath.Join(os.TempDir(), "gorm.db")), &gorm.Config{})
|
||||
// db, err := gorm.Open(postgres.Open("user=gorm password=gorm DB.name=gorm port=9920 sslmode=disable TimeZone=Asia/Shanghai"), &gorm.Config{})
|
||||
// db, err := gorm.Open(mysql.Open("gorm:gorm@tcp(localhost:9910)/gorm?charset=utf8&parseTime=True&loc=Local"), &gorm.Config{})
|
||||
// db, err := gorm.Open(sqlserver.Open("sqlserver://gorm:LoremIpsum86@localhost:9930?database=gorm"), &gorm.Config{})
|
||||
|
||||
/* your code */
|
||||
|
||||
if /* failure condition */ {
|
||||
fmt.Println("failed")
|
||||
} else {
|
||||
fmt.Println("success")
|
||||
}
|
||||
}
|
||||
```
|
||||
## GORM Playground Link: https://github.com/go-gorm/playground/pull/1 (change this to your link)
|
||||
|
|
|
@ -2,8 +2,10 @@ Make sure these boxes checked before submitting your pull request.
|
|||
|
||||
- [] Do only one thing
|
||||
- [] No API-breaking changes
|
||||
- [] New code/logic commented & tested
|
||||
- [] New code/logic commented & tested (important)
|
||||
|
||||
For significant changes like big bug fixes, new features, please open an issue to make an agreement on an implementation design/plan first before starting it.
|
||||
|
||||
### What did this pull request do?
|
||||
|
||||
### Use Case
|
||||
|
|
|
@ -32,7 +32,7 @@ jobs:
|
|||
path: ~/go/pkg/mod
|
||||
key: ${{ runner.os }}-go-${{ matrix.go }}-${{ hashFiles('tests/go.mod') }}
|
||||
|
||||
- name: run sqlite
|
||||
- name: Tests
|
||||
run: GORM_DIALECT=sqlite GORM_VERBOSE=true ./tests/tests_all.sh
|
||||
|
||||
sqlite_windows:
|
||||
|
@ -43,22 +43,22 @@ jobs:
|
|||
runs-on: ${{ matrix.platform }}
|
||||
|
||||
steps:
|
||||
- name: Set up Go 1.x
|
||||
uses: actions/setup-go@v2
|
||||
with:
|
||||
go-version: ${{ matrix.go }}
|
||||
- name: Set up Go 1.x
|
||||
uses: actions/setup-go@v2
|
||||
with:
|
||||
go-version: ${{ matrix.go }}
|
||||
|
||||
- name: Check out code into the Go module directory
|
||||
uses: actions/checkout@v2
|
||||
- name: Check out code into the Go module directory
|
||||
uses: actions/checkout@v2
|
||||
|
||||
- name: go mod pakcage cache
|
||||
uses: actions/cache@v2
|
||||
with:
|
||||
path: ~/go/pkg/mod
|
||||
key: ${{ runner.os }}-go-${{ matrix.go }}-${{ hashFiles('tests/go.mod') }}
|
||||
- name: go mod pakcage cache
|
||||
uses: actions/cache@v2
|
||||
with:
|
||||
path: ~/go/pkg/mod
|
||||
key: ${{ runner.os }}-go-${{ matrix.go }}-${{ hashFiles('tests/go.mod') }}
|
||||
|
||||
- name: run sqlite
|
||||
run: cd tests && set GORM_DIALECT=sqlite && go test $race -count=1 -v ./... #run the line in widnows's CMD, default GORM_DIALECT is sqlite
|
||||
- name: Tests
|
||||
run: cd tests && set GORM_DIALECT=sqlite && go test $race -count=1 -v ./... #run the line in widnows's CMD, default GORM_DIALECT is sqlite
|
||||
|
||||
mysql:
|
||||
strategy:
|
||||
|
@ -95,7 +95,7 @@ jobs:
|
|||
path: ~/go/pkg/mod
|
||||
key: ${{ runner.os }}-go-${{ matrix.go }}-${{ hashFiles('tests/go.mod') }}
|
||||
|
||||
- name: run mysql
|
||||
- name: Tests
|
||||
run: GORM_DIALECT=mysql GORM_VERBOSE=true GORM_DSN="gorm:gorm@tcp(localhost:9910)/gorm?charset=utf8&parseTime=True" ./tests/tests_all.sh
|
||||
|
||||
postgres:
|
||||
|
@ -138,7 +138,7 @@ jobs:
|
|||
path: ~/go/pkg/mod
|
||||
key: ${{ runner.os }}-go-${{ matrix.go }}-${{ hashFiles('tests/go.mod') }}
|
||||
|
||||
- name: run postgres
|
||||
- name: Tests
|
||||
run: GORM_DIALECT=postgres GORM_VERBOSE=true GORM_DSN="user=gorm password=gorm DB.name=gorm port=9920 sslmode=disable TimeZone=Asia/Shanghai" ./tests/tests_all.sh
|
||||
|
||||
sqlserver:
|
||||
|
@ -175,5 +175,5 @@ jobs:
|
|||
path: ~/go/pkg/mod
|
||||
key: ${{ runner.os }}-go-${{ matrix.go }}-${{ hashFiles('tests/go.mod') }}
|
||||
|
||||
- name: run sqlserver
|
||||
- name: Tests
|
||||
run: GORM_DIALECT=sqlserver GORM_VERBOSE=true GORM_DSN="sqlserver://gorm:LoremIpsum86@localhost:9930?database=gorm" ./tests/tests_all.sh
|
||||
|
|
Loading…
Reference in New Issue