1
0

.travis.yml 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. language: go
  2. go:
  3. - 1.6
  4. - 1.5.3
  5. - 1.4.3
  6. services:
  7. - redis-server
  8. - mysql
  9. - postgresql
  10. - memcached
  11. env:
  12. - ORM_DRIVER=sqlite3 ORM_SOURCE=$TRAVIS_BUILD_DIR/orm_test.db
  13. - ORM_DRIVER=mysql ORM_SOURCE="root:@/orm_test?charset=utf8"
  14. - ORM_DRIVER=postgres ORM_SOURCE="user=postgres dbname=orm_test sslmode=disable"
  15. before_install:
  16. - git clone git://github.com/ideawu/ssdb.git
  17. - cd ssdb
  18. - make
  19. - cd ..
  20. install:
  21. - go get github.com/lib/pq
  22. - go get github.com/go-sql-driver/mysql
  23. - go get github.com/mattn/go-sqlite3
  24. - go get github.com/bradfitz/gomemcache/memcache
  25. - go get github.com/garyburd/redigo/redis
  26. - go get github.com/beego/x2j
  27. - go get github.com/couchbase/go-couchbase
  28. - go get github.com/beego/goyaml2
  29. - go get github.com/belogik/goes
  30. - go get github.com/siddontang/ledisdb/config
  31. - go get github.com/siddontang/ledisdb/ledis
  32. - go get github.com/ssdb/gossdb/ssdb
  33. - go get github.com/cloudflare/golz4
  34. - go get github.com/gogo/protobuf/proto
  35. before_script:
  36. - psql --version
  37. - sh -c "if [ '$ORM_DRIVER' = 'postgres' ]; then psql -c 'create database orm_test;' -U postgres; fi"
  38. - sh -c "if [ '$ORM_DRIVER' = 'mysql' ]; then mysql -u root -e 'create database orm_test;'; fi"
  39. - sh -c "if [ '$ORM_DRIVER' = 'sqlite' ]; then touch $TRAVIS_BUILD_DIR/orm_test.db; fi"
  40. - sh -c "if [ $(go version) == *1.[5-9]* ]; then go get github.com/golang/lint/golint; golint ./...; fi"
  41. - sh -c "if [ $(go version) == *1.[5-9]* ]; then go tool vet .; fi"
  42. - mkdir -p res/var
  43. - ./ssdb/ssdb-server ./ssdb/ssdb.conf -d
  44. after_script:
  45. -killall -w ssdb-server
  46. - rm -rf ./res/var/*
  47. script:
  48. - go test -v ./...
  49. addons:
  50. postgresql: "9.4"