-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Add golang dep for downloading test dependencies * Create a makefile for supporting test and test-coverage * Update documentation with new development features * Update travis file to download and install golang dep * Drop support for GO 1.5 to 1.7
- Loading branch information
Showing
6 changed files
with
178 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,3 +2,4 @@ | |
*.swo | ||
cover.* | ||
cache-dir/* | ||
vendor |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,28 @@ | ||
language: go | ||
|
||
go: | ||
- 1.5 | ||
- 1.6 | ||
- 1.7 | ||
- tip | ||
- "1.8" | ||
- "1.9" | ||
- "1.10" | ||
- master | ||
|
||
services: | ||
- memcached | ||
- redis-server | ||
- mongodb | ||
|
||
env: | ||
- DEP_VERSION="0.4.1" | ||
|
||
before_install: | ||
- curl -L -s https://github.com/golang/dep/releases/download/v${DEP_VERSION}/dep-linux-amd64 -o $GOPATH/bin/dep | ||
- chmod +x $GOPATH/bin/dep | ||
- go get github.com/axw/gocov/gocov | ||
- go get github.com/mattn/goveralls | ||
- if ! go get github.com/golang/tools/cmd/cover; then go get golang.org/x/tools/cmd/cover; fi | ||
|
||
install: | ||
- dep ensure | ||
|
||
script: | ||
- $HOME/gopath/bin/goveralls -service=travis-ci |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
# Gopkg.toml example | ||
# | ||
# Refer to https://golang.github.io/dep/docs/Gopkg.toml.html | ||
# for detailed Gopkg.toml documentation. | ||
# | ||
# required = ["github.com/user/thing/cmd/thing"] | ||
# ignored = ["github.com/user/project/pkgX", "bitbucket.org/user/project/pkgA/pkgY"] | ||
# | ||
# [[constraint]] | ||
# name = "github.com/user/project" | ||
# version = "1.0.0" | ||
# | ||
# [[constraint]] | ||
# name = "github.com/user/project2" | ||
# branch = "dev" | ||
# source = "github.com/myfork/project2" | ||
# | ||
# [[override]] | ||
# name = "github.com/x/y" | ||
# version = "2.4.0" | ||
# | ||
# [prune] | ||
# non-go = false | ||
# go-tests = true | ||
# unused-packages = true | ||
|
||
|
||
[[constraint]] | ||
name = "github.com/bradfitz/gomemcache" | ||
revision = "1952afaa557dc08e8e0d89eafab110fb501c1a2b" | ||
|
||
[[constraint]] | ||
name = "github.com/pkg/errors" | ||
version = "0.8.0" | ||
|
||
[[constraint]] | ||
name = "github.com/stretchr/testify" | ||
version = "1.2.1" | ||
|
||
[[constraint]] | ||
branch = "v2" | ||
name = "gopkg.in/mgo.v2" | ||
|
||
[[constraint]] | ||
name = "gopkg.in/redis.v4" | ||
version = "4.2.4" | ||
|
||
[prune] | ||
go-tests = true | ||
unused-packages = true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
.PHONY: clean configure test test-coverage | ||
|
||
.DEFAULT_GOAL := test | ||
|
||
clean: | ||
@rm -fR vendor/ cover.* | ||
@docker-compose rm -s -f | ||
|
||
configure: | ||
@dep ensure -v | ||
@docker-compose up -d | ||
|
||
test: | ||
@go test -v . | ||
|
||
test-coverage: configure | ||
@go test -coverprofile=cover.out -v . | ||
@go tool cover -html=cover.out -o cover.html |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters