From e7d4452af0c8f51007c60a379a55dce39a9d3da3 Mon Sep 17 00:00:00 2001 From: astaxie Date: Mon, 25 Jan 2016 21:13:56 +0800 Subject: [PATCH] add golint and go test --- .travis.yml | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index c59cef61..bb98eebb 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,8 +1,9 @@ language: go go: - - 1.5.1 - + - 1.5.3 + - 1.4.3 + - 1.3.3 services: - redis-server - mysql @@ -24,7 +25,14 @@ install: - go get github.com/couchbase/go-couchbase - go get github.com/siddontang/ledisdb/config - go get github.com/siddontang/ledisdb/ledis + - go get code.google.com/p/go.tools/cmd/vet + - go get code.google.com/p/go.tools/cmd/cover + - go get github.com/golang/lint/golint before_script: - 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" +script: + - go vet -x ./... + - $HOME/gopath/bin/golint ./... + - go test -v ./...