improving load time for lint and tests commands

This commit is contained in:
Julien Neuhart
2019-08-20 10:45:56 +02:00
parent daf7cb9d6b
commit 4e4036382b
3 changed files with 11 additions and 24 deletions

View File

@@ -24,11 +24,13 @@ RUN curl -sfL https://install.goreleaser.com/github.com/golangci/golangci-lint.s
USER gotenberg
WORKDIR /gotenberg/lint
# Copy our code source.
COPY --chown=gotenberg:gotenberg . .
# Install module dependencies.
COPY --chown=gotenberg:gotenberg go.mod go.sum ./
RUN go mod download &&\
go mod verify
# Copy our code source.
COPY --chown=gotenberg:gotenberg . .
CMD ["golangci-lint", "run" ,"--tests=false", "--enable-all", "--disable=dupl" ]