зеркало из https://github.com/docker/engine-api.git
Add Makefile to test and validate.
Signed-off-by: David Calavera <david.calavera@gmail.com>
This commit is contained in:
Родитель
fca06b9767
Коммит
3b675ea1d5
10
.travis.yml
10
.travis.yml
|
@ -6,11 +6,5 @@
|
|||
go:
|
||||
- 1.5
|
||||
- tip
|
||||
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 -tags=test -v ./...
|
||||
install: make deps
|
||||
script: make validate && make test
|
||||
|
|
|
@ -0,0 +1,15 @@
|
|||
.PHONY: all deps test validate
|
||||
|
||||
all: deps test validate
|
||||
|
||||
deps:
|
||||
go get -t ./...
|
||||
go get github.com/golang/lint/golint
|
||||
|
||||
test:
|
||||
go test -tags=test ./...
|
||||
|
||||
validate:
|
||||
go vet ./...
|
||||
test -z "$(golint ./... | tee /dev/stderr)"
|
||||
test -z "$(gofmt -s -l . | tee /dev/stderr)"
|
|
@ -55,9 +55,11 @@ This package is still pending to be extracted from the Docker engine.
|
|||
|
||||
## Developing
|
||||
|
||||
engine-api requires some minimal libraries that you can download running `go get ./...`.
|
||||
engine-api requires some minimal libraries that you can download running `make deps`.
|
||||
|
||||
To run tests, use this command `go test -tags=test ./...`. We use build tags to isolate functions and structures that are only available for testing.
|
||||
To run tests, use the command `make test`. We use build tags to isolate functions and structures that are only available for testing.
|
||||
|
||||
To validate the sources, use the command `make validate`.
|
||||
|
||||
## License
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче