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

go:
A
astaxie 已提交
4
  - tip
A
astaxie 已提交
5 6 7
  - 1.5.3
  - 1.4.3
  - 1.3.3
A
astaxie 已提交
8 9 10 11 12 13
services:
  - redis-server
  - mysql
  - postgresql
  - memcached
env:
A
astaxie 已提交
14
  - ORM_DRIVER=sqlite3   ORM_SOURCE=$TRAVIS_BUILD_DIR/orm_test.db
A
astaxie 已提交
15 16
  - ORM_DRIVER=mysql    ORM_SOURCE="root:@/orm_test?charset=utf8"
  - ORM_DRIVER=postgres ORM_SOURCE="user=postgres dbname=orm_test sslmode=disable"
A
astaxie 已提交
17 18 19 20
install:
  - go get github.com/lib/pq
  - go get github.com/go-sql-driver/mysql
  - go get github.com/mattn/go-sqlite3
A
astaxie 已提交
21 22 23 24 25 26 27 28
  - 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 已提交
29
  - go get golang.org/x/tools/cmd/vet
A
astaxie 已提交
30
  - go get github.com/golang/lint/golint
A
astaxie 已提交
31
before_script:
A
astaxie 已提交
32 33 34
  - 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 已提交
35 36 37 38
script:
  - go vet -x ./...
  - $HOME/gopath/bin/golint ./...
  - go test -v ./...