-
Notifications
You must be signed in to change notification settings - Fork 7
/
.travis.yml
29 lines (29 loc) · 986 Bytes
/
.travis.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
language: go
go:
- 1.15.x
services:
- mysql
- postgres
addons:
postgresql: "9.6"
before_install:
- sudo apt-get -qq update
- sudo apt-get install sqlite
install:
- go get github.com/go-gorp/gorp
- go get github.com/juju/errors
- go get github.com/stretchr/testify/assert
- go get github.com/mattn/go-sqlite3
- go get github.com/lib/pq
- go get github.com/go-sql-driver/mysql
- go get golang.org/x/tools/cmd/cover
- go get github.com/mattn/goveralls
- go install github.com/mattn/goveralls
env:
- DB=sqlite
- DB=mysql DSN="travis:@/test?parseTime=true"
- DB=postgres DSN=postgres://postgres:@/test
before_script:
- sh -c "if [ '$DB' = 'postgres' ]; then psql -c 'DROP DATABASE test;' -U postgres; psql -c 'CREATE DATABASE test;' -U postgres; fi"
- sh -c "if [ '$DB' = 'mysql' ]; then mysql -e 'DROP DATABASE test;' ; mysql -e 'CREATE DATABASE test;'; mysql -e \"GRANT ALL PRIVILEGES ON test.* TO 'travis'@'%';\"; fi"
script: make testwithcoverage