From 4d5cec8bdd901743a87df798b2c4d9320a0ac48c Mon Sep 17 00:00:00 2001 From: Jinzhu Date: Wed, 24 Mar 2021 14:22:36 +0800 Subject: [PATCH] Add golang 1.16 --- .github/workflows/tests.yml | 12 ++++++------ go.mod | 2 +- go.sum | 4 ++-- tests/go.mod | 2 +- tests/tests_all.sh | 10 ++-------- 5 files changed, 12 insertions(+), 18 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index f26caa86..fec7d000 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -13,8 +13,8 @@ jobs: sqlite: strategy: matrix: - go: ['1.15', '1.14', '1.13'] - platform: [ubuntu-latest, macos-latest] # can not run in windows OS + go: ['1.16', '1.15', '1.14'] + platform: [ubuntu-latest] # can not run in windows OS runs-on: ${{ matrix.platform }} steps: @@ -38,7 +38,7 @@ jobs: sqlite_windows: strategy: matrix: - go: ['1.15', '1.14', '1.13'] + go: ['1.16', '1.15', '1.14'] platform: [windows-latest] runs-on: ${{ matrix.platform }} @@ -64,7 +64,7 @@ jobs: strategy: matrix: dbversion: ['mysql:latest', 'mysql:5.7', 'mysql:5.6', 'mariadb:latest'] - go: ['1.15', '1.14', '1.13'] + go: ['1.16', '1.15', '1.14'] platform: [ubuntu-latest] runs-on: ${{ matrix.platform }} @@ -108,7 +108,7 @@ jobs: strategy: matrix: dbversion: ['postgres:latest', 'postgres:11', 'postgres:10'] - go: ['1.15', '1.14', '1.13'] + go: ['1.16', '1.15', '1.14'] platform: [ubuntu-latest] # can not run in macOS and widnowsOS runs-on: ${{ matrix.platform }} @@ -150,7 +150,7 @@ jobs: sqlserver: strategy: matrix: - go: ['1.15', '1.14', '1.13'] + go: ['1.16', '1.15', '1.14'] platform: [ubuntu-latest] # can not run test in macOS and windows runs-on: ${{ matrix.platform }} diff --git a/go.mod b/go.mod index faf63a46..d95d3f10 100644 --- a/go.mod +++ b/go.mod @@ -4,5 +4,5 @@ go 1.14 require ( github.com/jinzhu/inflection v1.0.0 - github.com/jinzhu/now v1.1.1 + github.com/jinzhu/now v1.1.2 ) diff --git a/go.sum b/go.sum index 148bd6f5..c66a6b57 100644 --- a/go.sum +++ b/go.sum @@ -1,4 +1,4 @@ github.com/jinzhu/inflection v1.0.0 h1:K317FqzuhWc8YvSVlFMCCUb36O/S9MCKRDI7QkRKD/E= github.com/jinzhu/inflection v1.0.0/go.mod h1:h+uFLlag+Qp1Va5pdKtLDYj+kHp5pxUVkryuEj+Srlc= -github.com/jinzhu/now v1.1.1 h1:g39TucaRWyV3dwDO++eEc6qf8TVIQ/Da48WmqjZ3i7E= -github.com/jinzhu/now v1.1.1/go.mod h1:d3SSVoowX0Lcu0IBviAWJpolVfI5UJVZZ7cO71lE/z8= +github.com/jinzhu/now v1.1.2 h1:eVKgfIdy9b6zbWBMgFpfDPoAMifwSZagU9HmEU6zgiI= +github.com/jinzhu/now v1.1.2/go.mod h1:d3SSVoowX0Lcu0IBviAWJpolVfI5UJVZZ7cO71lE/z8= diff --git a/tests/go.mod b/tests/go.mod index 0765142c..7743e63a 100644 --- a/tests/go.mod +++ b/tests/go.mod @@ -4,7 +4,7 @@ go 1.14 require ( github.com/google/uuid v1.1.1 - github.com/jinzhu/now v1.1.1 + github.com/jinzhu/now v1.1.2 github.com/lib/pq v1.6.0 github.com/stretchr/testify v1.5.1 gorm.io/driver/mysql v1.0.5 diff --git a/tests/tests_all.sh b/tests/tests_all.sh index 744a40e9..2d6c35c3 100755 --- a/tests/tests_all.sh +++ b/tests/tests_all.sh @@ -9,11 +9,11 @@ fi if [ -d tests ] then cd tests - cp go.mod go.mod.bak - sed '/^[[:blank:]]*gorm.io\/driver/d' go.mod.bak > go.mod cd .. fi +go get -u ./... + for dialect in "${dialects[@]}" ; do if [ "$GORM_DIALECT" = "" ] || [ "$GORM_DIALECT" = "${dialect}" ] then @@ -39,9 +39,3 @@ for dialect in "${dialects[@]}" ; do fi fi done - -if [ -d tests ] -then - cd tests - mv go.mod.bak go.mod -fi