11---
22kind : pipeline
3- name : go1.10-test
4- workspace :
5- base : /go
6- path : src/gitea.com/xorm/xorm
7-
8- steps :
9- - name : build
10- pull : default
11- image : golang:1.10
12- commands :
13- - go get -t -d -v
14- - go build -v
15- when :
16- event :
17- - push
18- - pull_request
19-
20- - name : test-sqlite
21- pull : default
22- image : golang:1.10
23- depends_on :
24- - build
25- commands :
26- - " go test -v -race -db=\" sqlite3\" -conn_str=\" ./test.db\" -coverprofile=coverage1-1.txt -covermode=atomic"
27- - " go test -v -race -db=\" sqlite3\" -conn_str=\" ./test.db\" -cache=true -coverprofile=coverage1-2.txt -covermode=atomic"
28- when :
29- event :
30- - push
31- - pull_request
32-
33- - name : test-mysql
34- pull : default
35- image : golang:1.10
36- depends_on :
37- - build
38- commands :
39- - " go test -v -race -db=\" mysql\" -conn_str=\" root:@tcp(mysql)/xorm_test\" -coverprofile=coverage2-1.txt -covermode=atomic"
40- - " go test -v -race -db=\" mysql\" -conn_str=\" root:@tcp(mysql)/xorm_test\" -cache=true -coverprofile=coverage2-2.txt -covermode=atomic"
41- when :
42- event :
43- - push
44- - pull_request
45-
46- - name : test-mysql-utf8mb4
47- pull : default
48- image : golang:1.10
49- depends_on :
50- - test-mysql
51- commands :
52- - " go test -v -race -db=\" mysql\" -conn_str=\" root:@tcp(mysql)/xorm_test?charset=utf8mb4\" -coverprofile=coverage2.1-1.txt -covermode=atomic"
53- - " go test -v -race -db=\" mysql\" -conn_str=\" root:@tcp(mysql)/xorm_test?charset=utf8mb4\" -cache=true -coverprofile=coverage2.1-2.txt -covermode=atomic"
54- when :
55- event :
56- - push
57- - pull_request
58-
59- - name : test-mymysql
60- pull : default
61- image : golang:1.10
62- depends_on :
63- - test-mysql-utf8mb4
64- commands :
65- - " go test -v -race -db=\" mymysql\" -conn_str=\" tcp:mysql:3306*xorm_test/root/\" -coverprofile=coverage3-1.txt -covermode=atomic"
66- - " go test -v -race -db=\" mymysql\" -conn_str=\" tcp:mysql:3306*xorm_test/root/\" -cache=true -coverprofile=coverage3-2.txt -covermode=atomic"
67- when :
68- event :
69- - push
70- - pull_request
71-
72- - name : test-postgres
73- pull : default
74- image : golang:1.10
75- depends_on :
76- - build
77- commands :
78- - " go test -v -race -db=\" postgres\" -conn_str=\" postgres://postgres:@pgsql/xorm_test?sslmode=disable\" -coverprofile=coverage4-1.txt -covermode=atomic"
79- - " go test -v -race -db=\" postgres\" -conn_str=\" postgres://postgres:@pgsql/xorm_test?sslmode=disable\" -cache=true -coverprofile=coverage4-2.txt -covermode=atomic"
80- when :
81- event :
82- - push
83- - pull_request
84-
85- - name : test-postgres-schema
86- pull : default
87- image : golang:1.10
88- depends_on :
89- - build
90- commands :
91- - " go test -v -race -db=\" postgres\" -conn_str=\" postgres://postgres:@pgsql/xorm_test?sslmode=disable\" -schema=xorm -coverprofile=coverage5-1.txt -covermode=atomic"
92- - " go test -v -race -db=\" postgres\" -conn_str=\" postgres://postgres:@pgsql/xorm_test?sslmode=disable\" -schema=xorm -cache=true -coverprofile=coverage5-2.txt -covermode=atomic"
93- when :
94- event :
95- - push
96- - pull_request
97-
98- - name : test-mssql
99- pull : default
100- image : golang:1.10
101- depends_on :
102- - build
103- commands :
104- - " go test -v -race -db=\" mssql\" -conn_str=\" server=mssql;user id=sa;password=yourStrong(!)Password;database=xorm_test\" -coverprofile=coverage6-1.txt -covermode=atomic"
105- - " go test -v -race -db=\" mssql\" -conn_str=\" server=mssql;user id=sa;password=yourStrong(!)Password;database=xorm_test\" -cache=true -coverprofile=coverage6-2.txt -covermode=atomic"
106- when :
107- event :
108- - push
109- - pull_request
110-
111- - name : test-tidb
112- pull : default
113- image : golang:1.10
114- depends_on :
115- - build
116- commands :
117- - " go test -v -race -db=\" mysql\" -conn_str=\" root:@tcp(tidb:4000)/xorm_test\" -ignore_select_update=true -coverprofile=coverage7-1.txt -covermode=atomic"
118- - " go test -v -race -db=\" mysql\" -conn_str=\" root:@tcp(tidb:4000)/xorm_test\" -ignore_select_update=true -cache=true -coverprofile=coverage7-2.txt -covermode=atomic"
119- when :
120- event :
121- - push
122- - pull_request
123-
124- - name : test-end
125- pull : default
126- image : golang:1.10
127- depends_on :
128- - test-sqlite
129- - test-mysql
130- - test-mysql-utf8mb4
131- - test-mymysql
132- - test-postgres
133- - test-postgres-schema
134- - test-mssql
135- - test-tidb
136- commands :
137- - echo "go1.10 build end"
138- when :
139- event :
140- - push
141- - pull_request
142-
143- services :
144- - name : mysql
145- pull : default
146- image : mysql:5.7
147- environment :
148- MYSQL_ALLOW_EMPTY_PASSWORD : yes
149- MYSQL_DATABASE : xorm_test
150- when :
151- event :
152- - push
153- - tag
154- - pull_request
155-
156- - name : pgsql
157- pull : default
158- image : postgres:9.5
159- environment :
160- POSTGRES_DB : xorm_test
161- POSTGRES_USER : postgres
162- when :
163- event :
164- - push
165- - tag
166- - pull_request
167-
168- - name : mssql
169- pull : default
170- image : microsoft/mssql-server-linux:latest
171- environment :
172- ACCEPT_EULA : Y
173- SA_PASSWORD : yourStrong(!)Password
174- MSSQL_PID : Developer
175- when :
176- event :
177- - push
178- - tag
179- - pull_request
180-
181- - name : tidb
182- pull : default
183- image : pingcap/tidb:v3.0.3
184- when :
185- event :
186- - push
187- - tag
188- - pull_request
189-
190- ---
191- kind : pipeline
192- name : go1.13-test
3+ name : testing
1934steps :
194- - name : build
5+ - name : vet
1956 pull : default
196- image : golang:1.13
7+ image : golang:1.12
1978 environment :
1989 GO111MODULE : " on"
19910 GOPROXY : " https://goproxy.cn"
20011 commands :
201- - go build -v
202- - go vet
12+ - go vet ./...
20313 when :
20414 event :
20515 - push
20616 - pull_request
20717
20818- name : test-sqlite
20919 pull : default
210- image : golang:1.13
20+ image : golang:1.12
21121 environment :
21222 GO111MODULE : " on"
21323 GOPROXY : " https://goproxy.cn"
@@ -221,7 +31,7 @@ steps:
22131
22232- name : test-mysql
22333 pull : default
224- image : golang:1.13
34+ image : golang:1.12
22535 environment :
22636 GO111MODULE : " on"
22737 GOPROXY : " https://goproxy.cn"
@@ -235,7 +45,7 @@ steps:
23545
23646- name : test-mysql-utf8mb4
23747 pull : default
238- image : golang:1.13
48+ image : golang:1.12
23949 depends_on :
24050 - test-mysql
24151 environment :
@@ -251,7 +61,7 @@ steps:
25161
25262- name : test-mymysql
25363 pull : default
254- image : golang:1.13
64+ image : golang:1.12
25565 depends_on :
25666 - test-mysql-utf8mb4
25767 environment :
@@ -267,7 +77,7 @@ steps:
26777
26878- name : test-postgres
26979 pull : default
270- image : golang:1.13
80+ image : golang:1.12
27181 environment :
27282 GO111MODULE : " on"
27383 GOPROXY : " https://goproxy.cn"
@@ -281,7 +91,7 @@ steps:
28191
28292- name : test-postgres-schema
28393 pull : default
284- image : golang:1.13
94+ image : golang:1.12
28595 environment :
28696 GO111MODULE : " on"
28797 GOPROXY : " https://goproxy.cn"
@@ -295,7 +105,7 @@ steps:
295105
296106- name : test-mssql
297107 pull : default
298- image : golang:1.13
108+ image : golang:1.12
299109 environment :
300110 GO111MODULE : " on"
301111 GOPROXY : " https://goproxy.cn"
@@ -309,7 +119,7 @@ steps:
309119
310120- name : test-tidb
311121 pull : default
312- image : golang:1.13
122+ image : golang:1.12
313123 environment :
314124 GO111MODULE : " on"
315125 GOPROXY : " https://goproxy.cn"
@@ -323,7 +133,7 @@ steps:
323133
324134- name : merge_coverage
325135 pull : default
326- image : golang:1.13
136+ image : golang:1.12
327137 environment :
328138 GO111MODULE : " on"
329139 GOPROXY : " https://goproxy.cn"
0 commit comments