Run unit tests before build

This modifies Dockerfile.build.* to run unit tests before build.
This commit is contained in:
Sebastien Guilloux
2017-05-30 15:55:28 +02:00
committed by Alex Ellis
parent 9e711b3b5d
commit eccf94295f
2 changed files with 4 additions and 2 deletions

View File

@ -18,4 +18,5 @@ COPY requests requests
COPY tests tests
COPY server.go .
RUN CGO_ENABLED=0 GOOS=linux go build -a -installsuffix cgo -o app .
RUN go test -v ./tests && \
CGO_ENABLED=0 GOOS=linux go build -a -installsuffix cgo -o app .

View File

@ -17,4 +17,5 @@ COPY handlers handlers
COPY server.go .
RUN CGO_ENABLED=0 GOOS=linux go build -a -installsuffix cgo -o app .
RUN go test -v ./tests && \
CGO_ENABLED=0 GOOS=linux go build -a -installsuffix cgo -o app .