THIS IS A TEST INSTANCE ONLY! REPOSITORIES CAN BE DELETED AT ANY TIME!

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.

823 lines
22KB

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