Simple and Powerful ORM for Go, support mysql,postgres,tidb,sqlite3,mssql,oracle https://xorm.io
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.
 
 
 
 
 

232 lines
4.3 KiB

  1. ---
  2. kind: pipeline
  3. name: testing
  4. steps:
  5. - name: test-vet
  6. image: golang:1.12
  7. environment:
  8. GO111MODULE: "on"
  9. GOPROXY: "https://goproxy.cn"
  10. commands:
  11. - go vet
  12. when:
  13. event:
  14. - push
  15. - pull_request
  16. - name: test-sqlite
  17. image: golang:1.12
  18. environment:
  19. GO111MODULE: "on"
  20. GOPROXY: "https://goproxy.cn"
  21. commands:
  22. - make test-sqlite
  23. - TEST_CACHE_ENABLE=true make test-sqlite
  24. when:
  25. event:
  26. - push
  27. - pull_request
  28. - name: test-mysql
  29. image: golang:1.12
  30. environment:
  31. GO111MODULE: "on"
  32. GOPROXY: "https://goproxy.cn"
  33. TEST_MYSQL_HOST: mysql
  34. TEST_MYSQL_CHARSET: utf8
  35. TEST_MYSQL_DBNAME: xorm_test
  36. TEST_MYSQL_USERNAME: root
  37. TEST_MYSQL_PASSWORD:
  38. commands:
  39. - make test-mysql
  40. - TEST_CACHE_ENABLE=true make test-mysql
  41. when:
  42. event:
  43. - push
  44. - pull_request
  45. - name: test-mysql-utf8mb4
  46. image: golang:1.12
  47. depends_on:
  48. - test-mysql
  49. environment:
  50. GO111MODULE: "on"
  51. GOPROXY: "https://goproxy.cn"
  52. TEST_MYSQL_HOST: mysql
  53. TEST_MYSQL_CHARSET: utf8mb4
  54. TEST_MYSQL_DBNAME: xorm_test
  55. TEST_MYSQL_USERNAME: root
  56. TEST_MYSQL_PASSWORD:
  57. commands:
  58. - make test-mysql
  59. - TEST_CACHE_ENABLE=true make test-mysql
  60. when:
  61. event:
  62. - push
  63. - pull_request
  64. - name: test-mymysql
  65. pull: default
  66. image: golang:1.12
  67. depends_on:
  68. - test-mysql-utf8mb4
  69. environment:
  70. GO111MODULE: "on"
  71. GOPROXY: "https://goproxy.cn"
  72. TEST_MYSQL_HOST: mysql:3306
  73. TEST_MYSQL_DBNAME: xorm_test
  74. TEST_MYSQL_USERNAME: root
  75. TEST_MYSQL_PASSWORD:
  76. commands:
  77. - make test-mymysql
  78. - TEST_CACHE_ENABLE=true make test-mymysql
  79. when:
  80. event:
  81. - push
  82. - pull_request
  83. - name: test-postgres
  84. pull: default
  85. image: golang:1.12
  86. environment:
  87. GO111MODULE: "on"
  88. GOPROXY: "https://goproxy.cn"
  89. TEST_PGSQL_HOST: pgsql
  90. TEST_PGSQL_DBNAME: xorm_test
  91. TEST_PGSQL_USERNAME: postgres
  92. TEST_PGSQL_PASSWORD: postgres
  93. commands:
  94. - make test-postgres
  95. - TEST_CACHE_ENABLE=true make test-postgres
  96. when:
  97. event:
  98. - push
  99. - pull_request
  100. - name: test-postgres-schema
  101. pull: default
  102. image: golang:1.12
  103. depends_on:
  104. - test-postgres
  105. environment:
  106. GO111MODULE: "on"
  107. GOPROXY: "https://goproxy.cn"
  108. TEST_PGSQL_HOST: pgsql
  109. TEST_PGSQL_SCHEMA: xorm
  110. TEST_PGSQL_DBNAME: xorm_test
  111. TEST_PGSQL_USERNAME: postgres
  112. TEST_PGSQL_PASSWORD: postgres
  113. commands:
  114. - make test-postgres
  115. - TEST_CACHE_ENABLE=true make test-postgres
  116. when:
  117. event:
  118. - push
  119. - pull_request
  120. - name: test-mssql
  121. pull: default
  122. image: golang:1.12
  123. environment:
  124. GO111MODULE: "on"
  125. GOPROXY: "https://goproxy.cn"
  126. TEST_MSSQL_HOST: mssql
  127. TEST_MSSQL_DBNAME: xorm_test
  128. TEST_MSSQL_USERNAME: sa
  129. TEST_MSSQL_PASSWORD: "yourStrong(!)Password"
  130. commands:
  131. - make test-mssql
  132. - TEST_CACHE_ENABLE=true make test-mssql
  133. when:
  134. event:
  135. - push
  136. - pull_request
  137. - name: test-tidb
  138. pull: default
  139. image: golang:1.12
  140. environment:
  141. GO111MODULE: "on"
  142. GOPROXY: "https://goproxy.cn"
  143. TEST_TIDB_HOST: "tidb:4000"
  144. TEST_TIDB_DBNAME: xorm_test
  145. TEST_TIDB_USERNAME: root
  146. TEST_TIDB_PASSWORD:
  147. commands:
  148. - make test-tidb
  149. - TEST_CACHE_ENABLE=true make test-tidb
  150. when:
  151. event:
  152. - push
  153. - pull_request
  154. - name: merge_coverage
  155. pull: default
  156. image: golang:1.12
  157. environment:
  158. GO111MODULE: "on"
  159. GOPROXY: "https://goproxy.cn"
  160. depends_on:
  161. - test-vet
  162. - test-sqlite
  163. - test-mysql
  164. - test-mymysql
  165. - test-postgres
  166. - test-postgres-schema
  167. - test-mssql
  168. - test-tidb
  169. commands:
  170. - make coverage
  171. when:
  172. event:
  173. - push
  174. - pull_request
  175. services:
  176. - name: mysql
  177. pull: default
  178. image: mysql:5.7
  179. environment:
  180. MYSQL_ALLOW_EMPTY_PASSWORD: yes
  181. MYSQL_DATABASE: xorm_test
  182. when:
  183. event:
  184. - push
  185. - tag
  186. - pull_request
  187. - name: pgsql
  188. pull: default
  189. image: postgres:9.5
  190. environment:
  191. POSTGRES_DB: xorm_test
  192. POSTGRES_USER: postgres
  193. POSTGRES_PASSWORD: postgres
  194. when:
  195. event:
  196. - push
  197. - tag
  198. - pull_request
  199. - name: mssql
  200. pull: default
  201. image: microsoft/mssql-server-linux:latest
  202. environment:
  203. ACCEPT_EULA: Y
  204. SA_PASSWORD: yourStrong(!)Password
  205. MSSQL_PID: Developer
  206. when:
  207. event:
  208. - push
  209. - tag
  210. - pull_request
  211. - name: tidb
  212. pull: default
  213. image: pingcap/tidb:v3.0.3
  214. when:
  215. event:
  216. - push
  217. - tag
  218. - pull_request