You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Sep 7, 2021. It is now read-only.
This repository is currently being migrated. It's locked while the migration is in progress.
Copy file name to clipboardExpand all lines: .drone.yml
+17Lines changed: 17 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -25,6 +25,9 @@ services:
25
25
when:
26
26
event: [ push, tag, pull_request ]
27
27
28
+
redis:
29
+
image: redis:3.0
30
+
28
31
#mssql:
29
32
# image: microsoft/mssql-server-linux:2017-CU11
30
33
# environment:
@@ -55,12 +58,21 @@ pipeline:
55
58
psql -U postgres -d xorm_test -h pgsql \
56
59
-c "create schema xorm;"
57
60
61
+
init_redis:
62
+
image: redis:3.0
63
+
commands:
64
+
- sleep 5
65
+
- redis-cli -h redis ping
66
+
- redis-cli -h redis set HELLO hello
67
+
- redis-cli -h redis get HELLO
68
+
58
69
build:
59
70
image: golang:${GO_VERSION}
60
71
commands:
61
72
- go get -t -d -v ./...
62
73
- go get -u xorm.io/core
63
74
- go get -u xorm.io/builder
75
+
- go get -u github.com/go-xorm/xorm-redis-cache
64
76
- go build -v
65
77
when:
66
78
event: [ push, pull_request ]
@@ -71,6 +83,7 @@ pipeline:
71
83
- go get -u github.com/wadey/gocovmerge
72
84
- go test -v -race -db="sqlite3" -conn_str="./test.db" -coverprofile=coverage1-1.txt -covermode=atomic
73
85
- go test -v -race -db="sqlite3" -conn_str="./test.db" -cache=true -coverprofile=coverage1-2.txt -covermode=atomic
86
+
- go test -v -race -db="sqlite3" -conn_str="./test.db" -cache=true -cache_redis_server="redis:6379" -coverprofile=coverage1-2.txt -covermode=atomic
74
87
when:
75
88
event: [ push, pull_request ]
76
89
@@ -79,6 +92,7 @@ pipeline:
79
92
commands:
80
93
- go test -v -race -db="mysql" -conn_str="root:@tcp(mysql)/xorm_test" -coverprofile=coverage2-1.txt -covermode=atomic
81
94
- go test -v -race -db="mysql" -conn_str="root:@tcp(mysql)/xorm_test" -cache=true -coverprofile=coverage2-2.txt -covermode=atomic
95
+
- go test -v -race -db="mysql" -conn_str="root:@tcp(mysql)/xorm_test" -cache=true -cache_redis_server="redis:6379" -coverprofile=coverage2-2.txt -covermode=atomic
82
96
when:
83
97
event: [ push, pull_request ]
84
98
@@ -95,6 +109,7 @@ pipeline:
95
109
commands:
96
110
- go test -v -race -db="mymysql" -conn_str="tcp:mysql:3306*xorm_test/root/" -coverprofile=coverage3-1.txt -covermode=atomic
97
111
- go test -v -race -db="mymysql" -conn_str="tcp:mysql:3306*xorm_test/root/" -cache=true -coverprofile=coverage3-2.txt -covermode=atomic
112
+
- go test -v -race -db="mymysql" -conn_str="tcp:mysql:3306*xorm_test/root/" -cache=true -cache_redis_server="redis:6379" -coverprofile=coverage3-2.txt -covermode=atomic
98
113
when:
99
114
event: [ push, pull_request ]
100
115
@@ -103,6 +118,7 @@ pipeline:
103
118
commands:
104
119
- go test -v -race -db="postgres" -conn_str="postgres://postgres:@pgsql/xorm_test?sslmode=disable" -coverprofile=coverage4-1.txt -covermode=atomic
105
120
- go test -v -race -db="postgres" -conn_str="postgres://postgres:@pgsql/xorm_test?sslmode=disable" -cache=true -coverprofile=coverage4-2.txt -covermode=atomic
121
+
- go test -v -race -db="postgres" -conn_str="postgres://postgres:@pgsql/xorm_test?sslmode=disable" -cache=true -cache_redis_server="redis:6379" -coverprofile=coverage4-2.txt -covermode=atomic
106
122
when:
107
123
event: [ push, pull_request ]
108
124
@@ -111,6 +127,7 @@ pipeline:
111
127
commands:
112
128
- go test -v -race -db="postgres" -conn_str="postgres://postgres:@pgsql/xorm_test?sslmode=disable" -schema=xorm -coverprofile=coverage5-1.txt -covermode=atomic
113
129
- go test -v -race -db="postgres" -conn_str="postgres://postgres:@pgsql/xorm_test?sslmode=disable" -schema=xorm -cache=true -coverprofile=coverage5-2.txt -covermode=atomic
130
+
- go test -v -race -db="postgres" -conn_str="postgres://postgres:@pgsql/xorm_test?sslmode=disable" -schema=xorm -cache=true -cache_redis_server="redis:6379" -coverprofile=coverage5-2.txt -covermode=atomic
0 commit comments