mirror of https://github.com/docker/cli.git
add “test” target and make CI use it
Signed-off-by: Gaetan de Villele <gdevillele@gmail.com>
This commit is contained in:
parent
e8d0ecdf7e
commit
4d4203f7fd
5
Makefile
5
Makefile
|
@ -12,6 +12,11 @@ build: clean
|
||||||
clean:
|
clean:
|
||||||
@rm -rf ./build
|
@rm -rf ./build
|
||||||
|
|
||||||
|
# run go test
|
||||||
|
# the "-tags daemon" part is temporary
|
||||||
|
test:
|
||||||
|
@go test -tags daemon -v $(shell go list ./... | grep -v /vendor/)
|
||||||
|
|
||||||
# build the CLI for multiple architectures
|
# build the CLI for multiple architectures
|
||||||
cross: clean
|
cross: clean
|
||||||
@gox -output build/docker-{{.OS}}-{{.Arch}} \
|
@gox -output build/docker-{{.OS}}-{{.Arch}} \
|
||||||
|
|
|
@ -21,6 +21,10 @@ build: build_docker_image
|
||||||
clean: build_docker_image
|
clean: build_docker_image
|
||||||
@docker run --rm -v `pwd`:/go/src/github.com/docker/cli $(DEV_DOCKER_IMAGE_NAME) make clean
|
@docker run --rm -v `pwd`:/go/src/github.com/docker/cli $(DEV_DOCKER_IMAGE_NAME) make clean
|
||||||
|
|
||||||
|
# run go test
|
||||||
|
test: build_docker_image
|
||||||
|
@docker run --rm -v `pwd`:/go/src/github.com/docker/cli $(DEV_DOCKER_IMAGE_NAME) make test
|
||||||
|
|
||||||
# build the CLI for multiple architectures using a container
|
# build the CLI for multiple architectures using a container
|
||||||
cross: build_docker_image
|
cross: build_docker_image
|
||||||
@docker run --rm -v `pwd`:/go/src/github.com/docker/cli $(DEV_DOCKER_IMAGE_NAME) make cross
|
@docker run --rm -v `pwd`:/go/src/github.com/docker/cli $(DEV_DOCKER_IMAGE_NAME) make cross
|
||||||
|
|
|
@ -25,5 +25,6 @@ ENV CGO_ENABLED=0
|
||||||
WORKDIR /go/src/github.com/docker/cli
|
WORKDIR /go/src/github.com/docker/cli
|
||||||
|
|
||||||
RUN make cross
|
RUN make cross
|
||||||
|
RUN make test
|
||||||
|
|
||||||
CMD sh
|
CMD sh
|
||||||
|
|
Loading…
Reference in New Issue