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.

152 lines
2.4 KiB

  1. ---
  2. kind: pipeline
  3. name: go1.10
  4. platform:
  5. os: linux
  6. arch: amd64
  7. clone:
  8. disable: true
  9. workspace:
  10. base: /go
  11. path: src/xorm.io/core
  12. steps:
  13. - name: git
  14. pull: default
  15. image: plugins/git:next
  16. settings:
  17. depth: 50
  18. tags: true
  19. - name: test
  20. pull: default
  21. image: golang:1.10
  22. commands:
  23. - go get github.com/stretchr/testify/assert
  24. - go get github.com/go-xorm/sqlfiddle
  25. - go get github.com/go-sql-driver/mysql
  26. - go get github.com/mattn/go-sqlite3
  27. - go vet
  28. - "go test -v -race -coverprofile=coverage.txt -covermode=atomic -dbConn=\"root:@tcp(mysql:3306)/core_test?charset=utf8mb4\""
  29. when:
  30. event:
  31. - push
  32. - tag
  33. - pull_request
  34. services:
  35. - name: mysql
  36. pull: default
  37. image: mysql:5.7
  38. environment:
  39. MYSQL_ALLOW_EMPTY_PASSWORD: yes
  40. MYSQL_DATABASE: core_test
  41. when:
  42. event:
  43. - push
  44. - tag
  45. - pull_request
  46. ---
  47. kind: pipeline
  48. name: go1.11
  49. platform:
  50. os: linux
  51. arch: amd64
  52. clone:
  53. disable: true
  54. workspace:
  55. base: /go
  56. path: src/xorm.io/core
  57. steps:
  58. - name: git
  59. pull: default
  60. image: plugins/git:next
  61. settings:
  62. depth: 50
  63. tags: true
  64. - name: test
  65. pull: default
  66. image: golang:1.11
  67. commands:
  68. - go vet
  69. - "go test -v -race -coverprofile=coverage.txt -covermode=atomic -dbConn=\"root:@tcp(mysql:3306)/core_test?charset=utf8mb4\""
  70. environment:
  71. GO111MODULE: "on"
  72. GOPROXY: https://goproxy.cn
  73. when:
  74. event:
  75. - push
  76. - tag
  77. - pull_request
  78. services:
  79. - name: mysql
  80. pull: default
  81. image: mysql:5.7
  82. environment:
  83. MYSQL_ALLOW_EMPTY_PASSWORD: yes
  84. MYSQL_DATABASE: core_test
  85. when:
  86. event:
  87. - push
  88. - tag
  89. - pull_request
  90. ---
  91. kind: pipeline
  92. name: go1.12
  93. platform:
  94. os: linux
  95. arch: amd64
  96. clone:
  97. disable: true
  98. workspace:
  99. base: /go
  100. path: src/xorm.io/core
  101. steps:
  102. - name: git
  103. pull: default
  104. image: plugins/git:next
  105. settings:
  106. depth: 50
  107. tags: true
  108. - name: test
  109. pull: default
  110. image: golang:1.12
  111. commands:
  112. - go vet
  113. - "go test -v -race -coverprofile=coverage.txt -covermode=atomic -dbConn=\"root:@tcp(mysql:3306)/core_test?charset=utf8mb4\""
  114. environment:
  115. GO111MODULE: "on"
  116. GOPROXY: https://goproxy.cn
  117. when:
  118. event:
  119. - push
  120. - tag
  121. - pull_request
  122. services:
  123. - name: mysql
  124. pull: default
  125. image: mysql:5.7
  126. environment:
  127. MYSQL_ALLOW_EMPTY_PASSWORD: yes
  128. MYSQL_DATABASE: core_test
  129. when:
  130. event:
  131. - push
  132. - tag
  133. - pull_request