.travis.yml 1.2 KB
Newer Older
A
astaxie 已提交
1 2 3
language: go

go:
A
astaxie 已提交
4 5 6
  - 1.5.3
  - 1.4.3
  - 1.3.3
A
astaxie 已提交
7 8 9 10 11 12
services:
  - redis-server
  - mysql
  - postgresql
  - memcached
env:
A
astaxie 已提交
13
  - ORM_DRIVER=sqlite3   ORM_SOURCE=$TRAVIS_BUILD_DIR/orm_test.db
A
astaxie 已提交
14 15
  - ORM_DRIVER=mysql    ORM_SOURCE="root:@/orm_test?charset=utf8"
  - ORM_DRIVER=postgres ORM_SOURCE="user=postgres dbname=orm_test sslmode=disable"
A
astaxie 已提交
16 17 18 19
install:
  - go get github.com/lib/pq
  - go get github.com/go-sql-driver/mysql
  - go get github.com/mattn/go-sqlite3
A
astaxie 已提交
20 21 22 23 24 25 26 27
  - go get github.com/bradfitz/gomemcache/memcache
  - go get github.com/garyburd/redigo/redis
  - go get github.com/beego/x2j
  - go get github.com/beego/goyaml2
  - go get github.com/belogik/goes
  - go get github.com/couchbase/go-couchbase
  - go get github.com/siddontang/ledisdb/config
  - go get github.com/siddontang/ledisdb/ledis
A
astaxie 已提交
28
  - go get golang.org/x/tools/cmd/vet
A
astaxie 已提交
29
  - go get github.com/golang/lint/golint
A
astaxie 已提交
30
before_script:
A
astaxie 已提交
31 32 33
  - sh -c "if [ '$ORM_DRIVER' = 'postgres' ]; then psql -c 'create database orm_test;' -U postgres; fi"
  - sh -c "if [ '$ORM_DRIVER' = 'mysql' ]; then mysql -u root -e 'create database orm_test;'; fi"
  - sh -c "if [ '$ORM_DRIVER' = 'sqlite' ]; then touch $TRAVIS_BUILD_DIR/orm_test.db; fi"
A
astaxie 已提交
34 35 36 37
script:
  - go vet -x ./...
  - $HOME/gopath/bin/golint ./...
  - go test -v ./...