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