forked from docker/go-plugins-helpers
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Fix network ports (my bad) - Fix failing test since the `CapabilitiesResponse` was added - Create Makefile for ease of running tests using Docker - make test = with docker - make test-local = using local go - Tell Travis to use Docker Signed-off-by: Dave Tucker <[email protected]>
- Loading branch information
Dave Tucker
committed
Feb 8, 2016
1 parent
9512bef
commit 2ec24c6
Showing
4 changed files
with
47 additions
and
21 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,14 +1,8 @@ | ||
--- | ||
language: go | ||
sudo: required | ||
services: | ||
- docker | ||
notifications: | ||
email: false | ||
go: | ||
- 1.5 | ||
install: | ||
- go get -t ./... | ||
- go get github.com/golang/lint/golint | ||
script: | ||
- go vet ./... | ||
- test -z "$(golint ./... | tee /dev/stderr)" | ||
- test -z "$(gofmt -s -l . | tee /dev/stderr)" | ||
- go test -v ./... | ||
- make test |
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,33 @@ | ||
.PHONY: all test test-local install-deps lint fmt vet | ||
|
||
REPO_NAME = go-plugins-helpers | ||
REPO_OWNER = docker | ||
PKG_NAME = github.com/${REPO_NAME}/${REPO_OWNER} | ||
IMAGE = golang:1.5 | ||
|
||
all: test | ||
|
||
test-local: install-deps fmt lint vet | ||
@echo "+ $@" | ||
@go test -v ./... | ||
|
||
test: | ||
@docker run -v ${shell pwd}:/go/src/${PKG_NAME} -w /go/src/${PKG_NAME} ${IMAGE} make test-local | ||
|
||
install-deps: | ||
@echo "+ $@" | ||
@go get -u github.com/golang/lint/golint | ||
@go get -d ./... | ||
|
||
lint: | ||
@echo "+ $@" | ||
@test -z "$$(golint ./... | tee /dev/stderr)" | ||
|
||
fmt: | ||
@echo "+ $@" | ||
@test -z "$$(gofmt -s -l . | tee /dev/stderr)" | ||
|
||
vet: | ||
@echo "+ $@" | ||
@go vet ./... | ||
|
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