build: run tests in Dockerfile

This commit is contained in:
Deluan 2020-01-29 17:09:46 -05:00
parent 64388b2d4a
commit 482350c076
1 changed files with 4 additions and 1 deletions

View File

@ -27,8 +27,11 @@ WORKDIR /src
COPY go.mod go.sum ./
RUN go mod download
# Copy source and UI bundle, build executable
# Copy source, test it
COPY . .
RUN go test ./...
# Copy UI bundle, build executable
COPY --from=jsbuilder /src/build/* /src/ui/build/
COPY --from=jsbuilder /src/build/static/css/* /src/ui/build/static/css/
COPY --from=jsbuilder /src/build/static/js/* /src/ui/build/static/js/