forked from micanzhang/xorm
-
Notifications
You must be signed in to change notification settings - Fork 1
/
circle.yml
81 lines (80 loc) · 2.53 KB
/
circle.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
version: 2
jobs:
go:1.9:
docker:
- image: circleci/golang:1.9
- image: circleci/mysql:latest
environment:
- MYSQL_ALLOW_EMPTY_PASSWORD=true
- MYSQL_DATABASE=xorm_test
- MYSQL_USER=root
- image: postgres:latest
environment:
- POSTGRES_DB=xorm_test
working_directory: /go/src/github.com/lingochamp/xorm
steps:
- checkout
- run:
name: Install dependencies
command: |
go get -v -t -d ./...
- run:
name: Build
command: go build -race .
- run:
name: Test mysql
command: |
go test -v -race -db="mysql" -conn_str="root:@/xorm_test"
go test -v -race -db="mysql" -conn_str="root:@/xorm_test" -cache=true
- run:
name: Test postgres
command: |
go test -v -race -db="postgres" -conn_str="dbname=xorm_test sslmode=disable"
go test -v -race -db="postgres" -conn_str="dbname=xorm_test sslmode=disable" -cache=true
- run:
name: Test sqlite3
command: |
go test -v -race -db="sqlite3" -conn_str="./test.db"
go test -v -race -db="sqlite3" -conn_str="./test.db" -cache=true
go:latest:
docker:
- image: circleci/golang:latest
- image: circleci/mysql:latest
environment:
- MYSQL_ALLOW_EMPTY_PASSWORD=true
- MYSQL_DATABASE=xorm_test
- MYSQL_USER=root
- image: postgres:latest
environment:
- POSTGRES_DB=xorm_test
working_directory: /go/src/github.com/lingochamp/xorm
steps:
- checkout
- run:
name: Install dependencies
command: |
go get -v -t -d ./...
- run:
name: Build
command: go build -race .
- run:
name: Test mysql
command: |
go test -v -race -db="mysql" -conn_str="root:@/xorm_test"
go test -v -race -db="mysql" -conn_str="root:@/xorm_test" -cache=true
- run:
name: Test postgres
command: |
go test -v -race -db="postgres" -conn_str="dbname=xorm_test sslmode=disable"
go test -v -race -db="postgres" -conn_str="dbname=xorm_test sslmode=disable" -cache=true
- run:
name: Test sqlite3
command: |
go test -v -race -db="sqlite3" -conn_str="./test.db"
go test -v -race -db="sqlite3" -conn_str="./test.db" -cache=true
workflows:
version: 2
build_and_test:
jobs:
- go:1.9
- go:latest