-
Notifications
You must be signed in to change notification settings - Fork 88
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Go dep, local tests, minor refactoring (#52)
* vendor ignore in travis and ensure * vendor build in travis * indent changes and minor improvements * manual run of tests and dependencies * docker up before tests and dev readme * gopkg remove, indent and new lines * Makefile refactor * forcing go tools version * Removed colon from development header in readme * More info in make init disclaimer
- Loading branch information
1 parent
d58d64e
commit 71af614
Showing
7 changed files
with
91 additions
and
19 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 |
---|---|---|
@@ -1,2 +1,5 @@ | ||
.idea/ | ||
_vendor/ | ||
vendor/ | ||
coverage.out | ||
Gopkg.lock |
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
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,14 @@ | ||
# for tests | ||
required = ["github.com/golang/lint/golint"] | ||
|
||
[[override]] | ||
name = "golang.org/x/tools" | ||
revision = "a019f6b7c5bfcffdf421924fc0ddb74b867a53f2" | ||
|
||
[[constraint]] | ||
name = "github.com/stretchr/testify" | ||
version = "1.2.2" | ||
|
||
[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 @@ | ||
SHELL := /bin/bash | ||
|
||
init: | ||
dep ensure -v | ||
go install ./vendor/... | ||
|
||
up_docker_server: stop_docker_server | ||
docker run --rm=true -p 127.0.0.1:8123:8123 --name dbr-clickhouse-server -d yandex/clickhouse-server; | ||
|
||
stop_docker_server: | ||
test -n "$$(docker ps --format {{.Names}} | grep dbr-clickhouse-server)" && docker stop dbr-clickhouse-server || true | ||
|
||
test: up_docker_server | ||
test -z "$$(golint ./... | grep -v vendor | tee /dev/stderr)" | ||
go vet -v ./... | ||
test -z "$$(gofmt -d -s $$(find . -name \*.go -print | grep -v vendor) | tee /dev/stderr)" | ||
go test -v -covermode=count -coverprofile=coverage.out . | ||
$(MAKE) stop_docker_server |
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
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
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