Update issue template
This commit is contained in:
parent
7e1fa4a44d
commit
90f817db29
37
.github/ISSUE_TEMPLATE.md
vendored
37
.github/ISSUE_TEMPLATE.md
vendored
@ -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.
|
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.
|
||||||
|
|
||||||
|
## GORM Playground Link: https://github.com/go-gorm/playground/pull/1 (change this to your link)
|
||||||
### 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")
|
|
||||||
}
|
|
||||||
}
|
|
||||||
```
|
|
||||||
|
4
.github/PULL_REQUEST_TEMPLATE.md
vendored
4
.github/PULL_REQUEST_TEMPLATE.md
vendored
@ -2,8 +2,10 @@ Make sure these boxes checked before submitting your pull request.
|
|||||||
|
|
||||||
- [] Do only one thing
|
- [] Do only one thing
|
||||||
- [] No API-breaking changes
|
- [] 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.
|
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?
|
### What did this pull request do?
|
||||||
|
|
||||||
|
### Use Case
|
||||||
|
34
.github/workflows/tests.yml
vendored
34
.github/workflows/tests.yml
vendored
@ -32,7 +32,7 @@ jobs:
|
|||||||
path: ~/go/pkg/mod
|
path: ~/go/pkg/mod
|
||||||
key: ${{ runner.os }}-go-${{ matrix.go }}-${{ hashFiles('tests/go.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
|
run: GORM_DIALECT=sqlite GORM_VERBOSE=true ./tests/tests_all.sh
|
||||||
|
|
||||||
sqlite_windows:
|
sqlite_windows:
|
||||||
@ -43,22 +43,22 @@ jobs:
|
|||||||
runs-on: ${{ matrix.platform }}
|
runs-on: ${{ matrix.platform }}
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Set up Go 1.x
|
- name: Set up Go 1.x
|
||||||
uses: actions/setup-go@v2
|
uses: actions/setup-go@v2
|
||||||
with:
|
with:
|
||||||
go-version: ${{ matrix.go }}
|
go-version: ${{ matrix.go }}
|
||||||
|
|
||||||
- name: Check out code into the Go module directory
|
- name: Check out code into the Go module directory
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v2
|
||||||
|
|
||||||
- name: go mod pakcage cache
|
- name: go mod pakcage cache
|
||||||
uses: actions/cache@v2
|
uses: actions/cache@v2
|
||||||
with:
|
with:
|
||||||
path: ~/go/pkg/mod
|
path: ~/go/pkg/mod
|
||||||
key: ${{ runner.os }}-go-${{ matrix.go }}-${{ hashFiles('tests/go.mod') }}
|
key: ${{ runner.os }}-go-${{ matrix.go }}-${{ hashFiles('tests/go.mod') }}
|
||||||
|
|
||||||
- name: run 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
|
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:
|
mysql:
|
||||||
strategy:
|
strategy:
|
||||||
@ -95,7 +95,7 @@ jobs:
|
|||||||
path: ~/go/pkg/mod
|
path: ~/go/pkg/mod
|
||||||
key: ${{ runner.os }}-go-${{ matrix.go }}-${{ hashFiles('tests/go.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
|
run: GORM_DIALECT=mysql GORM_VERBOSE=true GORM_DSN="gorm:gorm@tcp(localhost:9910)/gorm?charset=utf8&parseTime=True" ./tests/tests_all.sh
|
||||||
|
|
||||||
postgres:
|
postgres:
|
||||||
@ -138,7 +138,7 @@ jobs:
|
|||||||
path: ~/go/pkg/mod
|
path: ~/go/pkg/mod
|
||||||
key: ${{ runner.os }}-go-${{ matrix.go }}-${{ hashFiles('tests/go.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
|
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:
|
sqlserver:
|
||||||
@ -175,5 +175,5 @@ jobs:
|
|||||||
path: ~/go/pkg/mod
|
path: ~/go/pkg/mod
|
||||||
key: ${{ runner.os }}-go-${{ matrix.go }}-${{ hashFiles('tests/go.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
|
run: GORM_DIALECT=sqlserver GORM_VERBOSE=true GORM_DSN="sqlserver://gorm:LoremIpsum86@localhost:9930?database=gorm" ./tests/tests_all.sh
|
||||||
|
Loading…
x
Reference in New Issue
Block a user