Add golang 1.16

This commit is contained in:
Jinzhu 2021-03-24 14:22:36 +08:00
parent 26dd4c980a
commit 4d5cec8bdd
5 changed files with 12 additions and 18 deletions

View File

@ -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 }}

2
go.mod
View File

@ -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
)

4
go.sum
View File

@ -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=

View File

@ -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

View File

@ -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