2016-01-08 07:34:02 +00:00
|
|
|
language: go
|
|
|
|
|
|
|
|
go:
|
2018-07-23 03:27:19 +00:00
|
|
|
- "1.9.7"
|
2018-07-20 14:45:44 +00:00
|
|
|
- "1.10.3"
|
2018-09-27 16:27:38 +00:00
|
|
|
- "1.11"
|
2016-01-08 07:34:02 +00:00
|
|
|
services:
|
|
|
|
- redis-server
|
|
|
|
- mysql
|
|
|
|
- postgresql
|
|
|
|
- memcached
|
|
|
|
env:
|
2016-01-17 10:35:11 +00:00
|
|
|
- ORM_DRIVER=sqlite3 ORM_SOURCE=$TRAVIS_BUILD_DIR/orm_test.db
|
2016-01-08 15:00:22 +00:00
|
|
|
- ORM_DRIVER=postgres ORM_SOURCE="user=postgres dbname=orm_test sslmode=disable"
|
2016-03-08 04:45:54 +00:00
|
|
|
before_install:
|
|
|
|
- git clone git://github.com/ideawu/ssdb.git
|
|
|
|
- cd ssdb
|
|
|
|
- make
|
|
|
|
- cd ..
|
2016-01-08 15:10:50 +00:00
|
|
|
install:
|
|
|
|
- go get github.com/lib/pq
|
|
|
|
- go get github.com/go-sql-driver/mysql
|
|
|
|
- go get github.com/mattn/go-sqlite3
|
2016-01-08 15:20:25 +00:00
|
|
|
- go get github.com/bradfitz/gomemcache/memcache
|
2018-03-26 08:59:01 +00:00
|
|
|
- go get github.com/gomodule/redigo/redis
|
2016-01-08 15:20:25 +00:00
|
|
|
- go get github.com/beego/x2j
|
2016-03-01 13:41:44 +00:00
|
|
|
- go get github.com/couchbase/go-couchbase
|
2016-01-08 15:20:25 +00:00
|
|
|
- go get github.com/beego/goyaml2
|
2018-05-31 11:48:24 +00:00
|
|
|
- go get gopkg.in/yaml.v2
|
2016-01-08 15:20:25 +00:00
|
|
|
- go get github.com/belogik/goes
|
|
|
|
- go get github.com/siddontang/ledisdb/config
|
|
|
|
- go get github.com/siddontang/ledisdb/ledis
|
2016-03-07 02:31:56 +00:00
|
|
|
- go get github.com/ssdb/gossdb/ssdb
|
2016-12-27 01:58:42 +00:00
|
|
|
- go get github.com/cloudflare/golz4
|
|
|
|
- go get github.com/gogo/protobuf/proto
|
2017-05-04 06:02:21 +00:00
|
|
|
- go get github.com/Knetic/govaluate
|
2017-05-19 14:19:31 +00:00
|
|
|
- go get github.com/casbin/casbin
|
2017-03-17 17:24:45 +00:00
|
|
|
- go get -u honnef.co/go/tools/cmd/gosimple
|
2017-03-17 17:45:30 +00:00
|
|
|
- go get -u github.com/mdempsky/unconvert
|
2017-04-28 13:38:08 +00:00
|
|
|
- go get -u github.com/gordonklaus/ineffassign
|
2017-04-30 14:41:23 +00:00
|
|
|
- go get -u github.com/golang/lint/golint
|
2018-07-20 04:14:27 +00:00
|
|
|
- go get -u github.com/go-redis/redis
|
2016-01-08 07:34:02 +00:00
|
|
|
before_script:
|
2016-04-11 13:19:10 +00:00
|
|
|
- psql --version
|
2016-01-08 15:00:22 +00:00
|
|
|
- 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"
|
2018-05-04 09:31:01 +00:00
|
|
|
- sh -c "go get github.com/golang/lint/golint; golint ./...;"
|
2018-07-30 07:13:04 +00:00
|
|
|
- sh -c "go list ./... | grep -v vendor | xargs go vet -v"
|
2016-03-08 04:45:54 +00:00
|
|
|
- mkdir -p res/var
|
|
|
|
- ./ssdb/ssdb-server ./ssdb/ssdb.conf -d
|
|
|
|
after_script:
|
|
|
|
-killall -w ssdb-server
|
|
|
|
- rm -rf ./res/var/*
|
2016-01-25 13:13:56 +00:00
|
|
|
script:
|
|
|
|
- go test -v ./...
|
2017-03-17 17:24:45 +00:00
|
|
|
- gosimple -ignore "$(cat .gosimpleignore)" $(go list ./... | grep -v /vendor/)
|
2017-03-17 17:45:30 +00:00
|
|
|
- unconvert $(go list ./... | grep -v /vendor/)
|
2017-04-28 13:38:08 +00:00
|
|
|
- ineffassign .
|
|
|
|
- find . ! \( -path './vendor' -prune \) -type f -name '*.go' -print0 | xargs -0 gofmt -l -s
|
2017-04-30 14:41:23 +00:00
|
|
|
- golint ./...
|
2016-04-11 15:12:35 +00:00
|
|
|
addons:
|
2018-05-04 09:31:01 +00:00
|
|
|
postgresql: "9.6"
|