Improve drone (#1537)

Fix drone

Improve drone

* use traditional positional parameters on inser...
Reviewed-on: https://gitea.com/xorm/xorm/pulls/1537
This commit is contained in:
Lunny Xiao 2020-02-21 06:40:24 +00:00
parent ea2dea3897
commit 83ec880ee2
2 changed files with 23 additions and 188 deletions

View File

@ -19,24 +19,9 @@ steps:
environment:
GO111MODULE: "on"
GOPROXY: "https://goproxy.cn"
TEST_CACHE_ENABLE: false
commands:
- make test-sqlite
when:
event:
- push
- pull_request
- name: test-sqlite-cache
image: golang:1.12
depends_on:
- test-sqlite
environment:
GO111MODULE: "on"
GOPROXY: "https://goproxy.cn"
TEST_CACHE_ENABLE: true
commands:
- make test-sqlite
- TEST_CACHE_ENABLE=true make test-sqlite
when:
event:
- push
@ -52,29 +37,9 @@ steps:
TEST_MYSQL_DBNAME: xorm_test
TEST_MYSQL_USERNAME: root
TEST_MYSQL_PASSWORD:
TEST_CACHE_ENABLE: false
commands:
- make test-mysql
when:
event:
- push
- pull_request
- name: test-mysql-cache
image: golang:1.12
depends_on:
- test-mysql
environment:
GO111MODULE: "on"
GOPROXY: "https://goproxy.cn"
TEST_MYSQL_HOST: mysql
TEST_MYSQL_CHARSET: utf8
TEST_MYSQL_DBNAME: xorm_test
TEST_MYSQL_USERNAME: root
TEST_MYSQL_PASSWORD:
TEST_CACHE_ENABLE: true
commands:
- make test-mysql
- TEST_CACHE_ENABLE=true make test-mysql
when:
event:
- push
@ -83,7 +48,7 @@ steps:
- name: test-mysql-utf8mb4
image: golang:1.12
depends_on:
- test-mysql-cache
- test-mysql
environment:
GO111MODULE: "on"
GOPROXY: "https://goproxy.cn"
@ -92,29 +57,9 @@ steps:
TEST_MYSQL_DBNAME: xorm_test
TEST_MYSQL_USERNAME: root
TEST_MYSQL_PASSWORD:
TEST_CACHE_ENABLE: false
commands:
- make test-mysql
when:
event:
- push
- pull_request
- name: test-mysql-utf8mb4-cache
image: golang:1.12
depends_on:
- test-mysql-utf8mb4
environment:
GO111MODULE: "on"
GOPROXY: "https://goproxy.cn"
TEST_MYSQL_HOST: mysql
TEST_MYSQL_CHARSET: utf8mb4
TEST_MYSQL_DBNAME: xorm_test
TEST_MYSQL_USERNAME: root
TEST_MYSQL_PASSWORD:
TEST_CACHE_ENABLE: true
commands:
- make test-mysql
- TEST_CACHE_ENABLE=true make test-mysql
when:
event:
- push
@ -124,7 +69,7 @@ steps:
pull: default
image: golang:1.12
depends_on:
- test-mysql-utf8mb4-cache
- test-mysql-utf8mb4
environment:
GO111MODULE: "on"
GOPROXY: "https://goproxy.cn"
@ -132,29 +77,9 @@ steps:
TEST_MYSQL_DBNAME: xorm_test
TEST_MYSQL_USERNAME: root
TEST_MYSQL_PASSWORD:
TEST_CACHE_ENABLE: false
commands:
- make test-mymysql
when:
event:
- push
- pull_request
- name: test-mymysql-cache
pull: default
image: golang:1.12
depends_on:
- test-mymysql
environment:
GO111MODULE: "on"
GOPROXY: "https://goproxy.cn"
TEST_MYSQL_HOST: mysql:3306
TEST_MYSQL_DBNAME: xorm_test
TEST_MYSQL_USERNAME: root
TEST_MYSQL_PASSWORD:
TEST_CACHE_ENABLE: true
commands:
- make test-mymysql
- TEST_CACHE_ENABLE=true make test-mymysql
when:
event:
- push
@ -170,59 +95,19 @@ steps:
TEST_PGSQL_DBNAME: xorm_test
TEST_PGSQL_USERNAME: postgres
TEST_PGSQL_PASSWORD: postgres
TEST_CACHE_ENABLE: false
commands:
- make test-postgres
when:
event:
- push
- pull_request
- name: test-postgres-cache
pull: default
image: golang:1.12
depends_on:
- test-postgres
environment:
GO111MODULE: "on"
GOPROXY: "https://goproxy.cn"
TEST_PGSQL_HOST: pgsql
TEST_PGSQL_DBNAME: xorm_test
TEST_PGSQL_USERNAME: postgres
TEST_PGSQL_PASSWORD: postgres
TEST_CACHE_ENABLE: true
commands:
- make test-postgres
- TEST_CACHE_ENABLE=true make test-postgres
when:
event:
- push
- pull_request
- name: test-postgres-schema
pull: default
image: golang:1.12
environment:
GO111MODULE: "on"
GOPROXY: "https://goproxy.cn"
TEST_PGSQL_HOST: pgsql
TEST_PGSQL_SCHEMA: xorm
TEST_PGSQL_DBNAME: xorm_test
TEST_PGSQL_USERNAME: postgres
TEST_PGSQL_PASSWORD: postgres
TEST_CACHE_ENABLE: false
SCHEMA: xorm
commands:
- make test-postgres
when:
event:
- push
- pull_request
- name: test-postgres-schema-cache
pull: default
image: golang:1.12
depends_on:
- test-postgres-schema
- test-postgres
environment:
GO111MODULE: "on"
GOPROXY: "https://goproxy.cn"
@ -231,10 +116,9 @@ steps:
TEST_PGSQL_DBNAME: xorm_test
TEST_PGSQL_USERNAME: postgres
TEST_PGSQL_PASSWORD: postgres
TEST_CACHE_ENABLE: true
SCHEMA: xorm
commands:
- make test-postgres
- TEST_CACHE_ENABLE=true make test-postgres
when:
event:
- push
@ -250,29 +134,9 @@ steps:
TEST_MSSQL_DBNAME: xorm_test
TEST_MSSQL_USERNAME: sa
TEST_MSSQL_PASSWORD: "yourStrong(!)Password"
TEST_CACHE_ENABLE: false
commands:
- make test-mssql
when:
event:
- push
- pull_request
- name: test-mssql-cache
pull: default
image: golang:1.12
depends_on:
- test-mssql
environment:
GO111MODULE: "on"
GOPROXY: "https://goproxy.cn"
TEST_MSSQL_HOST: mssql
TEST_MSSQL_DBNAME: xorm_test
TEST_MSSQL_USERNAME: sa
TEST_MSSQL_PASSWORD: "yourStrong(!)Password"
TEST_CACHE_ENABLE: true
commands:
- make test-mssql
- TEST_CACHE_ENABLE=true make test-mssql
when:
event:
- push
@ -288,29 +152,9 @@ steps:
TEST_TIDB_DBNAME: xorm_test
TEST_TIDB_USERNAME: root
TEST_TIDB_PASSWORD:
TEST_CACHE_ENABLE: false
commands:
- make test-tidb
when:
event:
- push
- pull_request
- name: test-tidb-cache
pull: default
image: golang:1.12
depends_on:
- test-tidb
environment:
GO111MODULE: "on"
GOPROXY: "https://goproxy.cn"
TEST_TIDB_HOST: "tidb:4000"
TEST_TIDB_DBNAME: xorm_test
TEST_TIDB_USERNAME: root
TEST_TIDB_PASSWORD:
TEST_CACHE_ENABLE: true
commands:
- make test-tidb
- TEST_CACHE_ENABLE=true make test-tidb
when:
event:
- push
@ -325,21 +169,12 @@ steps:
depends_on:
- test-vet
- test-sqlite
- test-sqlite-cache
- test-mysql
- test-mysql-cache
- test-mysql-utf8mb4
- test-mysql-utf8mb4-cache
- test-mymysql
- test-mymysql-cache
- test-postgres
- test-postgres-cache
- test-postgres-schema
- test-postgres-schema-cache
- test-mssql
- test-mssql-cache
- test-tidb
- test-tidb-cache
commands:
- make coverage
when:

View File

@ -117,71 +117,71 @@ test: test-sqlite
.PNONY: test-mssql
test-mssql: go-check
$(GO) test -race -db=mssql -cache=$(TEST_CACHE_ENABLE) \
$(GO) test -v -race -db=mssql -cache=$(TEST_CACHE_ENABLE) \
-conn_str="server=$(TEST_MSSQL_HOST);user id=$(TEST_MSSQL_USERNAME);password=$(TEST_MSSQL_PASSWORD);database=$(TEST_MSSQL_DBNAME)" \
-coverprofile=mssql.$(TEST_CACHE_ENABLE).coverage.out -covermode=atomic
.PNONY: test-mssql\#%
test-mssql\#%: go-check
$(GO) test -race -run $* -db=mssql -cache=$(TEST_CACHE_ENABLE) \
$(GO) test -v -race -run $* -db=mssql -cache=$(TEST_CACHE_ENABLE) \
-conn_str="server=$(TEST_MSSQL_HOST);user id=$(TEST_MSSQL_USERNAME);password=$(TEST_MSSQL_PASSWORD);database=$(TEST_MSSQL_DBNAME)" \
-coverprofile=mssql.$(TEST_CACHE_ENABLE).coverage.out -covermode=atomic
.PNONY: test-mymysql
test-mymysql: go-check
$(GO) test -race -db=mymysql -cache=$(TEST_CACHE_ENABLE) \
$(GO) test -v -race -db=mymysql -cache=$(TEST_CACHE_ENABLE) \
-conn_str="tcp:$(TEST_MYSQL_HOST)*$(TEST_MYSQL_DBNAME)/$(TEST_MYSQL_USERNAME)/$(TEST_MYSQL_PASSWORD)" \
-coverprofile=mymysql.$(TEST_CACHE_ENABLE).coverage.out -covermode=atomic
.PNONY: test-mymysql\#%
test-mymysql\#%: go-check
$(GO) test -race -run $* -db=mymysql -cache=$(TEST_CACHE_ENABLE) \
$(GO) test -v -race -run $* -db=mymysql -cache=$(TEST_CACHE_ENABLE) \
-conn_str="tcp:$(TEST_MYSQL_HOST)*$(TEST_MYSQL_DBNAME)/$(TEST_MYSQL_USERNAME)/$(TEST_MYSQL_PASSWORD)" \
-coverprofile=mymysql.$(TEST_CACHE_ENABLE).coverage.out -covermode=atomic
.PNONY: test-mysql
test-mysql: go-check
$(GO) test -race -db=mysql -cache=$(TEST_CACHE_ENABLE) \
$(GO) test -v -race -db=mysql -cache=$(TEST_CACHE_ENABLE) \
-conn_str="$(TEST_MYSQL_USERNAME):$(TEST_MYSQL_PASSWORD)@tcp($(TEST_MYSQL_HOST))/$(TEST_MYSQL_DBNAME)?charset=$(TEST_MYSQL_CHARSET)" \
-coverprofile=mysql.$(TEST_CACHE_ENABLE).coverage.out -covermode=atomic
.PHONY: test-mysql\#%
test-mysql\#%: go-check
$(GO) test -race -run $* -db=mysql -cache=$(TEST_CACHE_ENABLE) \
$(GO) test -v -race -run $* -db=mysql -cache=$(TEST_CACHE_ENABLE) \
-conn_str="$(TEST_MYSQL_USERNAME):$(TEST_MYSQL_PASSWORD)@tcp($(TEST_MYSQL_HOST))/$(TEST_MYSQL_DBNAME)?charset=$(TEST_MYSQL_CHARSET)" \
-coverprofile=mysql.$(TEST_CACHE_ENABLE).coverage.out -covermode=atomic
.PNONY: test-postgres
test-postgres: go-check
$(GO) test -race -db=postgres -schema='$(TEST_PGSQL_SCHEMA)' -cache=$(TEST_CACHE_ENABLE) \
$(GO) test -v -race -db=postgres -schema='$(TEST_PGSQL_SCHEMA)' -cache=$(TEST_CACHE_ENABLE) \
-conn_str="postgres://$(TEST_PGSQL_USERNAME):$(TEST_PGSQL_PASSWORD)@$(TEST_PGSQL_HOST)/$(TEST_PGSQL_DBNAME)?sslmode=disable" \
-coverprofile=postgres.$(TEST_CACHE_ENABLE).coverage.out -covermode=atomic
.PHONY: test-postgres\#%
test-postgres\#%: go-check
$(GO) test -race -run $* -db=postgres -schema='$(TEST_PGSQL_SCHEMA)' -cache=$(TEST_CACHE_ENABLE) \
$(GO) test -v -race -run $* -db=postgres -schema='$(TEST_PGSQL_SCHEMA)' -cache=$(TEST_CACHE_ENABLE) \
-conn_str="postgres://$(TEST_PGSQL_USERNAME):$(TEST_PGSQL_PASSWORD)@$(TEST_PGSQL_HOST)/$(TEST_PGSQL_DBNAME)?sslmode=disable" \
-coverprofile=postgres.$(TEST_CACHE_ENABLE).coverage.out -covermode=atomic
.PHONY: test-sqlite
test-sqlite: go-check
$(GO) test -race -cache=$(TEST_CACHE_ENABLE) -db=sqlite3 -conn_str="./test.db?cache=shared&mode=rwc" \
$(GO) test -v -race -cache=$(TEST_CACHE_ENABLE) -db=sqlite3 -conn_str="./test.db?cache=shared&mode=rwc" \
-coverprofile=sqlite.$(TEST_CACHE_ENABLE).coverage.out -covermode=atomic
.PHONY: test-sqlite\#%
test-sqlite\#%: go-check
$(GO) test -race -run $* -cache=$(TEST_CACHE_ENABLE) -db=sqlite3 -conn_str="./test.db?cache=shared&mode=rwc" \
$(GO) test -v -race -run $* -cache=$(TEST_CACHE_ENABLE) -db=sqlite3 -conn_str="./test.db?cache=shared&mode=rwc" \
-coverprofile=sqlite.$(TEST_CACHE_ENABLE).coverage.out -covermode=atomic
.PNONY: test-tidb
test-tidb: go-check
$(GO) test -race -db=mysql -cache=$(TEST_CACHE_ENABLE) -ignore_select_update=true \
$(GO) test -v -race -db=mysql -cache=$(TEST_CACHE_ENABLE) -ignore_select_update=true \
-conn_str="$(TEST_TIDB_USERNAME):$(TEST_TIDB_PASSWORD)@tcp($(TEST_TIDB_HOST))/$(TEST_TIDB_DBNAME)" \
-coverprofile=tidb.$(TEST_CACHE_ENABLE).coverage.out -covermode=atomic
.PHONY: test-tidb\#%
test-tidb\#%: go-check
$(GO) test -race -run $* -db=mysql -cache=$(TEST_CACHE_ENABLE) -ignore_select_update=true \
$(GO) test -v -race -run $* -db=mysql -cache=$(TEST_CACHE_ENABLE) -ignore_select_update=true \
-conn_str="$(TEST_TIDB_USERNAME):$(TEST_TIDB_PASSWORD)@tcp($(TEST_TIDB_HOST))/$(TEST_TIDB_DBNAME)" \
-coverprofile=tidb.$(TEST_CACHE_ENABLE).coverage.out -covermode=atomic