File tree Expand file tree Collapse file tree 1 file changed +44
-2
lines changed Expand file tree Collapse file tree 1 file changed +44
-2
lines changed Original file line number Diff line number Diff line change 41
41
mysql :
42
42
strategy :
43
43
matrix :
44
- dbversion : ['mysql:latest', 'mysql:5.7', 'mariadb:latest' ]
44
+ dbversion : ['mysql:latest', 'mysql:5.7']
45
45
go : ['1.19', '1.18']
46
46
platform : [ubuntu-latest]
47
47
runs-on : ${{ matrix.platform }}
72
72
- name : Check out code into the Go module directory
73
73
uses : actions/checkout@v3
74
74
75
-
76
75
- name : go mod package cache
77
76
uses : actions/cache@v3
78
77
with :
82
81
- name : Tests
83
82
run : GITHUB_ACTION=true GORM_DIALECT=mysql GORM_DSN="gorm:gorm@tcp(localhost:9910)/gorm?charset=utf8&parseTime=True" ./tests/tests_all.sh
84
83
84
+ mariadb :
85
+ strategy :
86
+ matrix :
87
+ dbversion : [ 'mariadb:latest' ]
88
+ go : [ '1.19', '1.18' ]
89
+ platform : [ ubuntu-latest ]
90
+ runs-on : ${{ matrix.platform }}
91
+
92
+ services :
93
+ mysql :
94
+ image : ${{ matrix.dbversion }}
95
+ env :
96
+ MYSQL_DATABASE : gorm
97
+ MYSQL_USER : gorm
98
+ MYSQL_PASSWORD : gorm
99
+ MYSQL_RANDOM_ROOT_PASSWORD : " yes"
100
+ ports :
101
+ - 9910:3306
102
+ options : >-
103
+ --health-cmd "mariadb-admin ping -ugorm -pgorm"
104
+ --health-interval 10s
105
+ --health-start-period 10s
106
+ --health-timeout 5s
107
+ --health-retries 10
108
+
109
+ steps :
110
+ - name : Set up Go 1.x
111
+ uses : actions/setup-go@v4
112
+ with :
113
+ go-version : ${{ matrix.go }}
114
+
115
+ - name : Check out code into the Go module directory
116
+ uses : actions/checkout@v3
117
+
118
+ - name : go mod package cache
119
+ uses : actions/cache@v3
120
+ with :
121
+ path : ~/go/pkg/mod
122
+ key : ${{ runner.os }}-go-${{ matrix.go }}-${{ hashFiles('tests/go.mod') }}
123
+
124
+ - name : Tests
125
+ run : GITHUB_ACTION=true GORM_DIALECT=mysql GORM_DSN="gorm:gorm@tcp(localhost:9910)/gorm?charset=utf8&parseTime=True" ./tests/tests_all.sh
126
+
85
127
postgres :
86
128
strategy :
87
129
matrix :
You can’t perform that action at this time.
0 commit comments