improve drone

This commit is contained in:
Lunny Xiao 2021-04-08 21:39:46 +08:00
parent 7e83a83e06
commit 3e9ab06566
1 changed files with 60 additions and 15 deletions

View File

@ -16,7 +16,7 @@ steps:
image: golang:1.13 # The lowest golang requirement image: golang:1.13 # The lowest golang requirement
environment: environment:
GO111MODULE: "on" GO111MODULE: "on"
GOPROXY: "https://goproxy.cn" GOPROXY: "https://goproxy.io"
commands: commands:
- make vet - make vet
- make test - make test
@ -26,6 +26,11 @@ steps:
- push - push
- pull_request - pull_request
volumes:
- name: cache
host:
path: /tmp/cache
--- ---
kind: pipeline kind: pipeline
name: test-sqlite name: test-sqlite
@ -46,12 +51,17 @@ steps:
image: golang:1.13 image: golang:1.13
environment: environment:
GO111MODULE: "on" GO111MODULE: "on"
GOPROXY: "https://goproxy.cn" GOPROXY: "https://goproxy.io"
commands: commands:
- make test-sqlite - make test-sqlite
- TEST_CACHE_ENABLE=true make test-sqlite - TEST_CACHE_ENABLE=true make test-sqlite
- TEST_QUOTE_POLICY=reserved make test-sqlite - TEST_QUOTE_POLICY=reserved make test-sqlite
volumes:
- name: cache
host:
path: /tmp/cache
--- ---
kind: pipeline kind: pipeline
name: test-mysql name: test-mysql
@ -72,7 +82,7 @@ steps:
image: golang:1.13 image: golang:1.13
environment: environment:
GO111MODULE: "on" GO111MODULE: "on"
GOPROXY: "https://goproxy.cn" GOPROXY: "https://goproxy.io"
TEST_MYSQL_HOST: mysql TEST_MYSQL_HOST: mysql
TEST_MYSQL_CHARSET: utf8 TEST_MYSQL_CHARSET: utf8
TEST_MYSQL_DBNAME: xorm_test TEST_MYSQL_DBNAME: xorm_test
@ -89,7 +99,7 @@ steps:
- test-mysql - test-mysql
environment: environment:
GO111MODULE: "on" GO111MODULE: "on"
GOPROXY: "https://goproxy.cn" GOPROXY: "https://goproxy.io"
TEST_MYSQL_HOST: mysql TEST_MYSQL_HOST: mysql
TEST_MYSQL_CHARSET: utf8mb4 TEST_MYSQL_CHARSET: utf8mb4
TEST_MYSQL_DBNAME: xorm_test TEST_MYSQL_DBNAME: xorm_test
@ -107,7 +117,7 @@ steps:
- test-mysql-utf8mb4 - test-mysql-utf8mb4
environment: environment:
GO111MODULE: "on" GO111MODULE: "on"
GOPROXY: "https://goproxy.cn" GOPROXY: "https://goproxy.io"
TEST_MYSQL_HOST: mysql:3306 TEST_MYSQL_HOST: mysql:3306
TEST_MYSQL_DBNAME: xorm_test TEST_MYSQL_DBNAME: xorm_test
TEST_MYSQL_USERNAME: root TEST_MYSQL_USERNAME: root
@ -125,6 +135,11 @@ services:
MYSQL_ALLOW_EMPTY_PASSWORD: yes MYSQL_ALLOW_EMPTY_PASSWORD: yes
MYSQL_DATABASE: xorm_test MYSQL_DATABASE: xorm_test
volumes:
- name: cache
host:
path: /tmp/cache
--- ---
kind: pipeline kind: pipeline
name: test-mysql8 name: test-mysql8
@ -145,7 +160,7 @@ steps:
image: golang:1.13 image: golang:1.13
environment: environment:
GO111MODULE: "on" GO111MODULE: "on"
GOPROXY: "https://goproxy.cn" GOPROXY: "https://goproxy.io"
TEST_MYSQL_HOST: mysql8 TEST_MYSQL_HOST: mysql8
TEST_MYSQL_CHARSET: utf8mb4 TEST_MYSQL_CHARSET: utf8mb4
TEST_MYSQL_DBNAME: xorm_test TEST_MYSQL_DBNAME: xorm_test
@ -164,6 +179,11 @@ services:
MYSQL_ALLOW_EMPTY_PASSWORD: yes MYSQL_ALLOW_EMPTY_PASSWORD: yes
MYSQL_DATABASE: xorm_test MYSQL_DATABASE: xorm_test
volumes:
- name: cache
host:
path: /tmp/cache
--- ---
kind: pipeline kind: pipeline
name: test-mariadb name: test-mariadb
@ -184,7 +204,7 @@ steps:
image: golang:1.13 image: golang:1.13
environment: environment:
GO111MODULE: "on" GO111MODULE: "on"
GOPROXY: "https://goproxy.cn" GOPROXY: "https://goproxy.io"
TEST_MYSQL_HOST: mariadb TEST_MYSQL_HOST: mariadb
TEST_MYSQL_CHARSET: utf8mb4 TEST_MYSQL_CHARSET: utf8mb4
TEST_MYSQL_DBNAME: xorm_test TEST_MYSQL_DBNAME: xorm_test
@ -203,6 +223,11 @@ services:
MYSQL_ALLOW_EMPTY_PASSWORD: yes MYSQL_ALLOW_EMPTY_PASSWORD: yes
MYSQL_DATABASE: xorm_test MYSQL_DATABASE: xorm_test
volumes:
- name: cache
host:
path: /tmp/cache
--- ---
kind: pipeline kind: pipeline
name: test-postgres name: test-postgres
@ -224,7 +249,7 @@ steps:
image: golang:1.13 image: golang:1.13
environment: environment:
GO111MODULE: "on" GO111MODULE: "on"
GOPROXY: "https://goproxy.cn" GOPROXY: "https://goproxy.io"
TEST_PGSQL_HOST: pgsql TEST_PGSQL_HOST: pgsql
TEST_PGSQL_DBNAME: xorm_test TEST_PGSQL_DBNAME: xorm_test
TEST_PGSQL_USERNAME: postgres TEST_PGSQL_USERNAME: postgres
@ -241,7 +266,7 @@ steps:
- test-postgres - test-postgres
environment: environment:
GO111MODULE: "on" GO111MODULE: "on"
GOPROXY: "https://goproxy.cn" GOPROXY: "https://goproxy.io"
TEST_PGSQL_HOST: pgsql TEST_PGSQL_HOST: pgsql
TEST_PGSQL_SCHEMA: xorm TEST_PGSQL_SCHEMA: xorm
TEST_PGSQL_DBNAME: xorm_test TEST_PGSQL_DBNAME: xorm_test
@ -261,6 +286,11 @@ services:
POSTGRES_USER: postgres POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres POSTGRES_PASSWORD: postgres
volumes:
- name: cache
host:
path: /tmp/cache
--- ---
kind: pipeline kind: pipeline
name: test-mssql name: test-mssql
@ -282,7 +312,7 @@ steps:
image: golang:1.13 image: golang:1.13
environment: environment:
GO111MODULE: "on" GO111MODULE: "on"
GOPROXY: "https://goproxy.cn" GOPROXY: "https://goproxy.io"
TEST_MSSQL_HOST: mssql TEST_MSSQL_HOST: mssql
TEST_MSSQL_DBNAME: xorm_test TEST_MSSQL_DBNAME: xorm_test
TEST_MSSQL_USERNAME: sa TEST_MSSQL_USERNAME: sa
@ -302,6 +332,11 @@ services:
SA_PASSWORD: yourStrong(!)Password SA_PASSWORD: yourStrong(!)Password
MSSQL_PID: Developer MSSQL_PID: Developer
volumes:
- name: cache
host:
path: /tmp/cache
--- ---
kind: pipeline kind: pipeline
name: test-tidb name: test-tidb
@ -323,7 +358,7 @@ steps:
image: golang:1.13 image: golang:1.13
environment: environment:
GO111MODULE: "on" GO111MODULE: "on"
GOPROXY: "https://goproxy.cn" GOPROXY: "https://goproxy.io"
TEST_TIDB_HOST: "tidb:4000" TEST_TIDB_HOST: "tidb:4000"
TEST_TIDB_DBNAME: xorm_test TEST_TIDB_DBNAME: xorm_test
TEST_TIDB_USERNAME: root TEST_TIDB_USERNAME: root
@ -338,6 +373,11 @@ services:
pull: default pull: default
image: pingcap/tidb:v3.0.3 image: pingcap/tidb:v3.0.3
volumes:
- name: cache
host:
path: /tmp/cache
--- ---
kind: pipeline kind: pipeline
name: test-cockroach name: test-cockroach
@ -359,7 +399,7 @@ steps:
image: golang:1.13 image: golang:1.13
environment: environment:
GO111MODULE: "on" GO111MODULE: "on"
GOPROXY: "https://goproxy.cn" GOPROXY: "https://goproxy.io"
TEST_COCKROACH_HOST: "cockroach:26257" TEST_COCKROACH_HOST: "cockroach:26257"
TEST_COCKROACH_DBNAME: xorm_test TEST_COCKROACH_DBNAME: xorm_test
TEST_COCKROACH_USERNAME: root TEST_COCKROACH_USERNAME: root
@ -376,6 +416,11 @@ services:
commands: commands:
- /cockroach/cockroach start --insecure - /cockroach/cockroach start --insecure
volumes:
- name: cache
host:
path: /tmp/cache
--- ---
kind: pipeline kind: pipeline
name: merge_coverage name: merge_coverage
@ -395,7 +440,7 @@ steps:
image: golang:1.13 image: golang:1.13
environment: environment:
GO111MODULE: "on" GO111MODULE: "on"
GOPROXY: "https://goproxy.cn" GOPROXY: "https://goproxy.io"
commands: commands:
- make coverage - make coverage
when: when: