本站源代码
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

771 lines
21KB

  1. ---
  2. kind: pipeline
  3. name: matrix-1
  4. platform:
  5. os: linux
  6. arch: amd64
  7. workspace:
  8. base: /go
  9. path: src/gitea.com/xorm/xorm
  10. steps:
  11. - name: build
  12. pull: default
  13. image: golang:1.10
  14. commands:
  15. - go get -t -d -v ./...
  16. - go get -u xorm.io/core
  17. - go get -u xorm.io/builder
  18. - go build -v
  19. when:
  20. event:
  21. - push
  22. - pull_request
  23. - name: test-sqlite
  24. pull: default
  25. image: golang:1.10
  26. commands:
  27. - go get -u github.com/wadey/gocovmerge
  28. - "go test -v -race -db=\"sqlite3\" -conn_str=\"./test.db\" -coverprofile=coverage1-1.txt -covermode=atomic"
  29. - "go test -v -race -db=\"sqlite3\" -conn_str=\"./test.db\" -cache=true -coverprofile=coverage1-2.txt -covermode=atomic"
  30. when:
  31. event:
  32. - push
  33. - pull_request
  34. - name: test-mysql
  35. pull: default
  36. image: golang:1.10
  37. commands:
  38. - "go test -v -race -db=\"mysql\" -conn_str=\"root:@tcp(mysql)/xorm_test\" -coverprofile=coverage2-1.txt -covermode=atomic"
  39. - "go test -v -race -db=\"mysql\" -conn_str=\"root:@tcp(mysql)/xorm_test\" -cache=true -coverprofile=coverage2-2.txt -covermode=atomic"
  40. when:
  41. event:
  42. - push
  43. - pull_request
  44. - name: test-mysql-utf8mb4
  45. pull: default
  46. image: golang:1.10
  47. commands:
  48. - "go test -v -race -db=\"mysql\" -conn_str=\"root:@tcp(mysql)/xorm_test?charset=utf8mb4\" -coverprofile=coverage2.1-1.txt -covermode=atomic"
  49. - "go test -v -race -db=\"mysql\" -conn_str=\"root:@tcp(mysql)/xorm_test?charset=utf8mb4\" -cache=true -coverprofile=coverage2.1-2.txt -covermode=atomic"
  50. when:
  51. event:
  52. - push
  53. - pull_request
  54. - name: test-mymysql
  55. pull: default
  56. image: golang:1.10
  57. commands:
  58. - "go test -v -race -db=\"mymysql\" -conn_str=\"tcp:mysql:3306*xorm_test/root/\" -coverprofile=coverage3-1.txt -covermode=atomic"
  59. - "go test -v -race -db=\"mymysql\" -conn_str=\"tcp:mysql:3306*xorm_test/root/\" -cache=true -coverprofile=coverage3-2.txt -covermode=atomic"
  60. when:
  61. event:
  62. - push
  63. - pull_request
  64. - name: test-postgres
  65. pull: default
  66. image: golang:1.10
  67. commands:
  68. - "go test -v -race -db=\"postgres\" -conn_str=\"postgres://postgres:@pgsql/xorm_test?sslmode=disable\" -coverprofile=coverage4-1.txt -covermode=atomic"
  69. - "go test -v -race -db=\"postgres\" -conn_str=\"postgres://postgres:@pgsql/xorm_test?sslmode=disable\" -cache=true -coverprofile=coverage4-2.txt -covermode=atomic"
  70. when:
  71. event:
  72. - push
  73. - pull_request
  74. - name: test-postgres-schema
  75. pull: default
  76. image: golang:1.10
  77. commands:
  78. - "go test -v -race -db=\"postgres\" -conn_str=\"postgres://postgres:@pgsql/xorm_test?sslmode=disable\" -schema=xorm -coverprofile=coverage5-1.txt -covermode=atomic"
  79. - "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"
  80. when:
  81. event:
  82. - push
  83. - pull_request
  84. - name: test-mssql
  85. pull: default
  86. image: golang:1.10
  87. commands:
  88. - "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"
  89. - "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"
  90. when:
  91. event:
  92. - push
  93. - pull_request
  94. - name: test-tidb
  95. pull: default
  96. image: golang:1.10
  97. commands:
  98. - "go test -v -race -db=\"mysql\" -conn_str=\"root:@tcp(tidb:4000)/xorm_test\" -ignore_select_update=true -coverprofile=coverage7-1.txt -covermode=atomic"
  99. - "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"
  100. - gocovmerge coverage1-1.txt coverage1-2.txt coverage2-1.txt coverage2-2.txt coverage2.1-1.txt coverage2.1-2.txt coverage3-1.txt coverage3-2.txt coverage4-1.txt coverage4-2.txt coverage5-1.txt coverage5-2.txt coverage6-1.txt coverage6-2.txt coverage7-1.txt coverage7-2.txt > coverage.txt
  101. when:
  102. event:
  103. - push
  104. - pull_request
  105. services:
  106. - name: mysql
  107. pull: default
  108. image: mysql:5.7
  109. environment:
  110. MYSQL_ALLOW_EMPTY_PASSWORD: yes
  111. MYSQL_DATABASE: xorm_test
  112. when:
  113. event:
  114. - push
  115. - tag
  116. - pull_request
  117. - name: tidb
  118. pull: default
  119. image: pingcap/tidb:v3.0.3
  120. when:
  121. event:
  122. - push
  123. - tag
  124. - pull_request
  125. - name: pgsql
  126. pull: default
  127. image: postgres:9.5
  128. environment:
  129. POSTGRES_DB: xorm_test
  130. POSTGRES_USER: postgres
  131. when:
  132. event:
  133. - push
  134. - tag
  135. - pull_request
  136. - name: mssql
  137. pull: default
  138. image: microsoft/mssql-server-linux:latest
  139. environment:
  140. ACCEPT_EULA: Y
  141. SA_PASSWORD: yourStrong(!)Password
  142. MSSQL_PID: Developer
  143. when:
  144. event:
  145. - push
  146. - tag
  147. - pull_request
  148. ---
  149. kind: pipeline
  150. name: matrix-2
  151. platform:
  152. os: linux
  153. arch: amd64
  154. workspace:
  155. base: /go
  156. path: src/gitea.com/xorm/xorm
  157. steps:
  158. - name: build
  159. pull: default
  160. image: golang:1.11
  161. environment:
  162. GO111MODULE: "off"
  163. commands:
  164. - go get -t -d -v ./...
  165. - go get -u xorm.io/core
  166. - go get -u xorm.io/builder
  167. - go build -v
  168. when:
  169. event:
  170. - push
  171. - pull_request
  172. - name: build-gomod
  173. pull: default
  174. image: golang:1.11
  175. environment:
  176. GO111MODULE: "on"
  177. GOPROXY: "https://goproxy.cn"
  178. commands:
  179. - go build -v
  180. when:
  181. event:
  182. - push
  183. - pull_request
  184. - name: test-sqlite
  185. pull: default
  186. image: golang:1.11
  187. environment:
  188. GO111MODULE: "on"
  189. GOPROXY: "https://goproxy.cn"
  190. commands:
  191. - "go test -v -race -db=\"sqlite3\" -conn_str=\"./test.db\" -coverprofile=coverage1-1.txt -covermode=atomic"
  192. - "go test -v -race -db=\"sqlite3\" -conn_str=\"./test.db\" -cache=true -coverprofile=coverage1-2.txt -covermode=atomic"
  193. when:
  194. event:
  195. - push
  196. - pull_request
  197. - name: test-mysql
  198. pull: default
  199. image: golang:1.11
  200. environment:
  201. GO111MODULE: "on"
  202. GOPROXY: "https://goproxy.cn"
  203. commands:
  204. - "go test -v -race -db=\"mysql\" -conn_str=\"root:@tcp(mysql)/xorm_test\" -coverprofile=coverage2-1.txt -covermode=atomic"
  205. - "go test -v -race -db=\"mysql\" -conn_str=\"root:@tcp(mysql)/xorm_test\" -cache=true -coverprofile=coverage2-2.txt -covermode=atomic"
  206. when:
  207. event:
  208. - push
  209. - pull_request
  210. - name: test-mysql-utf8mb4
  211. pull: default
  212. image: golang:1.11
  213. environment:
  214. GO111MODULE: "on"
  215. GOPROXY: "https://goproxy.cn"
  216. commands:
  217. - "go test -v -race -db=\"mysql\" -conn_str=\"root:@tcp(mysql)/xorm_test?charset=utf8mb4\" -coverprofile=coverage2.1-1.txt -covermode=atomic"
  218. - "go test -v -race -db=\"mysql\" -conn_str=\"root:@tcp(mysql)/xorm_test?charset=utf8mb4\" -cache=true -coverprofile=coverage2.1-2.txt -covermode=atomic"
  219. when:
  220. event:
  221. - push
  222. - pull_request
  223. - name: test-mymysql
  224. pull: default
  225. image: golang:1.11
  226. environment:
  227. GO111MODULE: "on"
  228. GOPROXY: "https://goproxy.cn"
  229. commands:
  230. - "go test -v -race -db=\"mymysql\" -conn_str=\"tcp:mysql:3306*xorm_test/root/\" -coverprofile=coverage3-1.txt -covermode=atomic"
  231. - "go test -v -race -db=\"mymysql\" -conn_str=\"tcp:mysql:3306*xorm_test/root/\" -cache=true -coverprofile=coverage3-2.txt -covermode=atomic"
  232. when:
  233. event:
  234. - push
  235. - pull_request
  236. - name: test-postgres
  237. pull: default
  238. image: golang:1.11
  239. environment:
  240. GO111MODULE: "on"
  241. GOPROXY: "https://goproxy.cn"
  242. commands:
  243. - "go test -v -race -db=\"postgres\" -conn_str=\"postgres://postgres:@pgsql/xorm_test?sslmode=disable\" -coverprofile=coverage4-1.txt -covermode=atomic"
  244. - "go test -v -race -db=\"postgres\" -conn_str=\"postgres://postgres:@pgsql/xorm_test?sslmode=disable\" -cache=true -coverprofile=coverage4-2.txt -covermode=atomic"
  245. when:
  246. event:
  247. - push
  248. - pull_request
  249. - name: test-postgres-schema
  250. pull: default
  251. image: golang:1.11
  252. environment:
  253. GO111MODULE: "on"
  254. GOPROXY: "https://goproxy.cn"
  255. commands:
  256. - "go test -v -race -db=\"postgres\" -conn_str=\"postgres://postgres:@pgsql/xorm_test?sslmode=disable\" -schema=xorm -coverprofile=coverage5-1.txt -covermode=atomic"
  257. - "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"
  258. when:
  259. event:
  260. - push
  261. - pull_request
  262. - name: test-mssql
  263. pull: default
  264. image: golang:1.11
  265. environment:
  266. GO111MODULE: "on"
  267. GOPROXY: "https://goproxy.cn"
  268. commands:
  269. - "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"
  270. - "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"
  271. when:
  272. event:
  273. - push
  274. - pull_request
  275. - name: test-tidb
  276. pull: default
  277. image: golang:1.11
  278. environment:
  279. GO111MODULE: "on"
  280. GOPROXY: "https://goproxy.cn"
  281. commands:
  282. - "go test -v -race -db=\"mysql\" -conn_str=\"root:@tcp(tidb:4000)/xorm_test\" -ignore_select_update=true -coverprofile=coverage7-1.txt -covermode=atomic"
  283. - "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"
  284. - go get github.com/wadey/gocovmerge
  285. - gocovmerge coverage1-1.txt coverage1-2.txt coverage2-1.txt coverage2-2.txt coverage2.1-1.txt coverage2.1-2.txt coverage3-1.txt coverage3-2.txt coverage4-1.txt coverage4-2.txt coverage5-1.txt coverage5-2.txt coverage6-1.txt coverage6-2.txt coverage7-1.txt coverage7-2.txt > coverage.txt
  286. when:
  287. event:
  288. - push
  289. - pull_request
  290. services:
  291. - name: mysql
  292. pull: default
  293. image: mysql:5.7
  294. environment:
  295. MYSQL_ALLOW_EMPTY_PASSWORD: yes
  296. MYSQL_DATABASE: xorm_test
  297. when:
  298. event:
  299. - push
  300. - tag
  301. - pull_request
  302. - name: tidb
  303. pull: default
  304. image: pingcap/tidb:v3.0.3
  305. when:
  306. event:
  307. - push
  308. - tag
  309. - pull_request
  310. - name: pgsql
  311. pull: default
  312. image: postgres:9.5
  313. environment:
  314. POSTGRES_DB: xorm_test
  315. POSTGRES_USER: postgres
  316. when:
  317. event:
  318. - push
  319. - tag
  320. - pull_request
  321. - name: mssql
  322. pull: default
  323. image: microsoft/mssql-server-linux:latest
  324. environment:
  325. ACCEPT_EULA: Y
  326. SA_PASSWORD: yourStrong(!)Password
  327. MSSQL_PID: Developer
  328. when:
  329. event:
  330. - push
  331. - tag
  332. - pull_request
  333. ---
  334. kind: pipeline
  335. name: matrix-3
  336. platform:
  337. os: linux
  338. arch: amd64
  339. workspace:
  340. base: /go
  341. path: src/gitea.com/xorm/xorm
  342. steps:
  343. - name: build
  344. pull: default
  345. image: golang:1.12
  346. environment:
  347. GO111MODULE: "off"
  348. commands:
  349. - go get -t -d -v ./...
  350. - go get -u xorm.io/core
  351. - go get -u xorm.io/builder
  352. - go build -v
  353. when:
  354. event:
  355. - push
  356. - pull_request
  357. - name: build-gomod
  358. pull: default
  359. image: golang:1.12
  360. environment:
  361. GO111MODULE: "on"
  362. GOPROXY: "https://goproxy.cn"
  363. commands:
  364. - go build -v
  365. when:
  366. event:
  367. - push
  368. - pull_request
  369. - name: test-sqlite
  370. pull: default
  371. image: golang:1.12
  372. environment:
  373. GO111MODULE: "on"
  374. GOPROXY: "https://goproxy.cn"
  375. commands:
  376. - "go test -v -race -db=\"sqlite3\" -conn_str=\"./test.db\" -coverprofile=coverage1-1.txt -covermode=atomic"
  377. - "go test -v -race -db=\"sqlite3\" -conn_str=\"./test.db\" -cache=true -coverprofile=coverage1-2.txt -covermode=atomic"
  378. when:
  379. event:
  380. - push
  381. - pull_request
  382. - name: test-mysql
  383. pull: default
  384. image: golang:1.12
  385. environment:
  386. GO111MODULE: "on"
  387. GOPROXY: "https://goproxy.cn"
  388. commands:
  389. - "go test -v -race -db=\"mysql\" -conn_str=\"root:@tcp(mysql)/xorm_test\" -coverprofile=coverage2-1.txt -covermode=atomic"
  390. - "go test -v -race -db=\"mysql\" -conn_str=\"root:@tcp(mysql)/xorm_test\" -cache=true -coverprofile=coverage2-2.txt -covermode=atomic"
  391. when:
  392. event:
  393. - push
  394. - pull_request
  395. - name: test-mysql-utf8mb4
  396. pull: default
  397. image: golang:1.12
  398. environment:
  399. GO111MODULE: "on"
  400. GOPROXY: "https://goproxy.cn"
  401. commands:
  402. - "go test -v -race -db=\"mysql\" -conn_str=\"root:@tcp(mysql)/xorm_test?charset=utf8mb4\" -coverprofile=coverage2.1-1.txt -covermode=atomic"
  403. - "go test -v -race -db=\"mysql\" -conn_str=\"root:@tcp(mysql)/xorm_test?charset=utf8mb4\" -cache=true -coverprofile=coverage2.1-2.txt -covermode=atomic"
  404. when:
  405. event:
  406. - push
  407. - pull_request
  408. - name: test-mymysql
  409. pull: default
  410. image: golang:1.12
  411. environment:
  412. GO111MODULE: "on"
  413. GOPROXY: "https://goproxy.cn"
  414. commands:
  415. - "go test -v -race -db=\"mymysql\" -conn_str=\"tcp:mysql:3306*xorm_test/root/\" -coverprofile=coverage3-1.txt -covermode=atomic"
  416. - "go test -v -race -db=\"mymysql\" -conn_str=\"tcp:mysql:3306*xorm_test/root/\" -cache=true -coverprofile=coverage3-2.txt -covermode=atomic"
  417. when:
  418. event:
  419. - push
  420. - pull_request
  421. - name: test-postgres
  422. pull: default
  423. image: golang:1.12
  424. environment:
  425. GO111MODULE: "on"
  426. GOPROXY: "https://goproxy.cn"
  427. commands:
  428. - "go test -v -race -db=\"postgres\" -conn_str=\"postgres://postgres:@pgsql/xorm_test?sslmode=disable\" -coverprofile=coverage4-1.txt -covermode=atomic"
  429. - "go test -v -race -db=\"postgres\" -conn_str=\"postgres://postgres:@pgsql/xorm_test?sslmode=disable\" -cache=true -coverprofile=coverage4-2.txt -covermode=atomic"
  430. when:
  431. event:
  432. - push
  433. - pull_request
  434. - name: test-postgres-schema
  435. pull: default
  436. image: golang:1.12
  437. environment:
  438. GO111MODULE: "on"
  439. GOPROXY: "https://goproxy.cn"
  440. commands:
  441. - "go test -v -race -db=\"postgres\" -conn_str=\"postgres://postgres:@pgsql/xorm_test?sslmode=disable\" -schema=xorm -coverprofile=coverage5-1.txt -covermode=atomic"
  442. - "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"
  443. when:
  444. event:
  445. - push
  446. - pull_request
  447. - name: test-mssql
  448. pull: default
  449. image: golang:1.12
  450. environment:
  451. GO111MODULE: "on"
  452. GOPROXY: "https://goproxy.cn"
  453. commands:
  454. - "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"
  455. - "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"
  456. when:
  457. event:
  458. - push
  459. - pull_request
  460. - name: test-tidb
  461. pull: default
  462. image: golang:1.12
  463. environment:
  464. GO111MODULE: "on"
  465. GOPROXY: "https://goproxy.cn"
  466. commands:
  467. - "go test -v -race -db=\"mysql\" -conn_str=\"root:@tcp(tidb:4000)/xorm_test\" -ignore_select_update=true -coverprofile=coverage7-1.txt -covermode=atomic"
  468. - "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"
  469. - go get github.com/wadey/gocovmerge
  470. - gocovmerge coverage1-1.txt coverage1-2.txt coverage2-1.txt coverage2-2.txt coverage2.1-1.txt coverage2.1-2.txt coverage3-1.txt coverage3-2.txt coverage4-1.txt coverage4-2.txt coverage5-1.txt coverage5-2.txt coverage6-1.txt coverage6-2.txt coverage7-1.txt coverage7-2.txt > coverage.txt
  471. when:
  472. event:
  473. - push
  474. - pull_request
  475. services:
  476. - name: mysql
  477. pull: default
  478. image: mysql:5.7
  479. environment:
  480. MYSQL_ALLOW_EMPTY_PASSWORD: yes
  481. MYSQL_DATABASE: xorm_test
  482. when:
  483. event:
  484. - push
  485. - tag
  486. - pull_request
  487. - name: tidb
  488. pull: default
  489. image: pingcap/tidb:v3.0.3
  490. when:
  491. event:
  492. - push
  493. - tag
  494. - pull_request
  495. - name: pgsql
  496. pull: default
  497. image: postgres:9.5
  498. environment:
  499. POSTGRES_DB: xorm_test
  500. POSTGRES_USER: postgres
  501. when:
  502. event:
  503. - push
  504. - tag
  505. - pull_request
  506. - name: mssql
  507. pull: default
  508. image: microsoft/mssql-server-linux:latest
  509. environment:
  510. ACCEPT_EULA: Y
  511. SA_PASSWORD: yourStrong(!)Password
  512. MSSQL_PID: Developer
  513. when:
  514. event:
  515. - push
  516. - tag
  517. - pull_request
  518. ---
  519. kind: pipeline
  520. name: go1.13
  521. platform:
  522. os: linux
  523. arch: amd64
  524. workspace:
  525. base: /go
  526. path: src/gitea.com/xorm/xorm
  527. steps:
  528. - name: build
  529. pull: default
  530. image: golang:1.13
  531. environment:
  532. GO111MODULE: "off"
  533. commands:
  534. - go get -t -d -v ./...
  535. - go get -u xorm.io/core
  536. - go get -u xorm.io/builder
  537. - go build -v
  538. when:
  539. event:
  540. - push
  541. - pull_request
  542. - name: build-gomod
  543. pull: default
  544. image: golang:1.13
  545. environment:
  546. GO111MODULE: "on"
  547. GOPROXY: "https://goproxy.cn"
  548. commands:
  549. - go build -v
  550. when:
  551. event:
  552. - push
  553. - pull_request
  554. - name: test-sqlite
  555. pull: default
  556. image: golang:1.13
  557. environment:
  558. GO111MODULE: "on"
  559. GOPROXY: "https://goproxy.cn"
  560. commands:
  561. - "go test -v -race -db=\"sqlite3\" -conn_str=\"./test.db\" -coverprofile=coverage1-1.txt -covermode=atomic"
  562. - "go test -v -race -db=\"sqlite3\" -conn_str=\"./test.db\" -cache=true -coverprofile=coverage1-2.txt -covermode=atomic"
  563. when:
  564. event:
  565. - push
  566. - pull_request
  567. - name: test-mysql
  568. pull: default
  569. image: golang:1.13
  570. environment:
  571. GO111MODULE: "on"
  572. GOPROXY: "https://goproxy.cn"
  573. commands:
  574. - "go test -v -race -db=\"mysql\" -conn_str=\"root:@tcp(mysql)/xorm_test\" -coverprofile=coverage2-1.txt -covermode=atomic"
  575. - "go test -v -race -db=\"mysql\" -conn_str=\"root:@tcp(mysql)/xorm_test\" -cache=true -coverprofile=coverage2-2.txt -covermode=atomic"
  576. when:
  577. event:
  578. - push
  579. - pull_request
  580. - name: test-mysql-utf8mb4
  581. pull: default
  582. image: golang:1.13
  583. environment:
  584. GO111MODULE: "on"
  585. GOPROXY: "https://goproxy.cn"
  586. commands:
  587. - "go test -v -race -db=\"mysql\" -conn_str=\"root:@tcp(mysql)/xorm_test?charset=utf8mb4\" -coverprofile=coverage2.1-1.txt -covermode=atomic"
  588. - "go test -v -race -db=\"mysql\" -conn_str=\"root:@tcp(mysql)/xorm_test?charset=utf8mb4\" -cache=true -coverprofile=coverage2.1-2.txt -covermode=atomic"
  589. when:
  590. event:
  591. - push
  592. - pull_request
  593. - name: test-mymysql
  594. pull: default
  595. image: golang:1.13
  596. environment:
  597. GO111MODULE: "on"
  598. GOPROXY: "https://goproxy.cn"
  599. commands:
  600. - "go test -v -race -db=\"mymysql\" -conn_str=\"tcp:mysql:3306*xorm_test/root/\" -coverprofile=coverage3-1.txt -covermode=atomic"
  601. - "go test -v -race -db=\"mymysql\" -conn_str=\"tcp:mysql:3306*xorm_test/root/\" -cache=true -coverprofile=coverage3-2.txt -covermode=atomic"
  602. when:
  603. event:
  604. - push
  605. - pull_request
  606. - name: test-postgres
  607. pull: default
  608. image: golang:1.13
  609. environment:
  610. GO111MODULE: "on"
  611. GOPROXY: "https://goproxy.cn"
  612. commands:
  613. - "go test -v -race -db=\"postgres\" -conn_str=\"postgres://postgres:@pgsql/xorm_test?sslmode=disable\" -coverprofile=coverage4-1.txt -covermode=atomic"
  614. - "go test -v -race -db=\"postgres\" -conn_str=\"postgres://postgres:@pgsql/xorm_test?sslmode=disable\" -cache=true -coverprofile=coverage4-2.txt -covermode=atomic"
  615. when:
  616. event:
  617. - push
  618. - pull_request
  619. - name: test-postgres-schema
  620. pull: default
  621. image: golang:1.13
  622. environment:
  623. GO111MODULE: "on"
  624. GOPROXY: "https://goproxy.cn"
  625. commands:
  626. - "go test -v -race -db=\"postgres\" -conn_str=\"postgres://postgres:@pgsql/xorm_test?sslmode=disable\" -schema=xorm -coverprofile=coverage5-1.txt -covermode=atomic"
  627. - "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"
  628. when:
  629. event:
  630. - push
  631. - pull_request
  632. - name: test-mssql
  633. pull: default
  634. image: golang:1.13
  635. environment:
  636. GO111MODULE: "on"
  637. GOPROXY: "https://goproxy.cn"
  638. commands:
  639. - "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"
  640. - "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"
  641. when:
  642. event:
  643. - push
  644. - pull_request
  645. - name: test-tidb
  646. pull: default
  647. image: golang:1.13
  648. environment:
  649. GO111MODULE: "on"
  650. GOPROXY: "https://goproxy.cn"
  651. commands:
  652. - "go test -v -race -db=\"mysql\" -conn_str=\"root:@tcp(tidb:4000)/xorm_test\" -ignore_select_update=true -coverprofile=coverage7-1.txt -covermode=atomic"
  653. - "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"
  654. - go get github.com/wadey/gocovmerge
  655. - gocovmerge coverage1-1.txt coverage1-2.txt coverage2-1.txt coverage2-2.txt coverage2.1-1.txt coverage2.1-2.txt coverage3-1.txt coverage3-2.txt coverage4-1.txt coverage4-2.txt coverage5-1.txt coverage5-2.txt coverage6-1.txt coverage6-2.txt coverage7-1.txt coverage7-2.txt > coverage.txt
  656. when:
  657. event:
  658. - push
  659. - pull_request
  660. services:
  661. - name: mysql
  662. pull: default
  663. image: mysql:5.7
  664. environment:
  665. MYSQL_ALLOW_EMPTY_PASSWORD: yes
  666. MYSQL_DATABASE: xorm_test
  667. when:
  668. event:
  669. - push
  670. - tag
  671. - pull_request
  672. - name: tidb
  673. pull: default
  674. image: pingcap/tidb:v3.0.3
  675. when:
  676. event:
  677. - push
  678. - tag
  679. - pull_request
  680. - name: pgsql
  681. pull: default
  682. image: postgres:9.5
  683. environment:
  684. POSTGRES_DB: xorm_test
  685. POSTGRES_USER: postgres
  686. when:
  687. event:
  688. - push
  689. - tag
  690. - pull_request
  691. - name: mssql
  692. pull: default
  693. image: microsoft/mssql-server-linux:latest
  694. environment:
  695. ACCEPT_EULA: Y
  696. SA_PASSWORD: yourStrong(!)Password
  697. MSSQL_PID: Developer
  698. when:
  699. event:
  700. - push
  701. - tag
  702. - pull_request
上海开阖软件有限公司 沪ICP备12045867号-1