mirror of
https://github.com/gotenberg/gotenberg.git
synced 2026-08-17 20:52:14 +01:00
improving load time for lint and tests commands
This commit is contained in:
@@ -24,11 +24,13 @@ RUN curl -sfL https://install.goreleaser.com/github.com/golangci/golangci-lint.s
|
|||||||
USER gotenberg
|
USER gotenberg
|
||||||
WORKDIR /gotenberg/lint
|
WORKDIR /gotenberg/lint
|
||||||
|
|
||||||
# Copy our code source.
|
|
||||||
COPY --chown=gotenberg:gotenberg . .
|
|
||||||
|
|
||||||
# Install module dependencies.
|
# Install module dependencies.
|
||||||
|
COPY --chown=gotenberg:gotenberg go.mod go.sum ./
|
||||||
|
|
||||||
RUN go mod download &&\
|
RUN go mod download &&\
|
||||||
go mod verify
|
go mod verify
|
||||||
|
|
||||||
|
# Copy our code source.
|
||||||
|
COPY --chown=gotenberg:gotenberg . .
|
||||||
|
|
||||||
CMD ["golangci-lint", "run" ,"--tests=false", "--enable-all", "--disable=dupl" ]
|
CMD ["golangci-lint", "run" ,"--tests=false", "--enable-all", "--disable=dupl" ]
|
||||||
@@ -4,11 +4,13 @@ FROM thecodingmachine/gotenberg:workspace
|
|||||||
USER gotenberg
|
USER gotenberg
|
||||||
WORKDIR /gotenberg/tests
|
WORKDIR /gotenberg/tests
|
||||||
|
|
||||||
# Copy our code source.
|
|
||||||
COPY --chown=gotenberg:gotenberg . .
|
|
||||||
|
|
||||||
# Install module dependencies.
|
# Install module dependencies.
|
||||||
|
COPY --chown=gotenberg:gotenberg go.mod go.sum ./
|
||||||
|
|
||||||
RUN go mod download &&\
|
RUN go mod download &&\
|
||||||
go mod verify
|
go mod verify
|
||||||
|
|
||||||
|
# Copy our code source.
|
||||||
|
COPY --chown=gotenberg:gotenberg . .
|
||||||
|
|
||||||
ENTRYPOINT [ "build/tests/docker-entrypoint.sh" ]
|
ENTRYPOINT [ "build/tests/docker-entrypoint.sh" ]
|
||||||
@@ -15,20 +15,3 @@ go run github.com/thecodingmachine/gotenberg/test/cmd/pm2
|
|||||||
|
|
||||||
# Run our tests.
|
# Run our tests.
|
||||||
go test -race -cover ./...
|
go test -race -cover ./...
|
||||||
|
|
||||||
# Testing PM2 processes launch separatly for avoiding
|
|
||||||
# spending to much time on each tests depending on
|
|
||||||
# them.
|
|
||||||
#go test github.com/thecodingmachine/gotenberg/internal/pkg/pm2 -run TestChromeStart
|
|
||||||
#go test github.com/thecodingmachine/gotenberg/internal/pkg/pm2 -run TestUnoconvStart
|
|
||||||
|
|
||||||
# Running others tests.
|
|
||||||
#go test -race -cover -covermode=atomic github.com/thecodingmachine/gotenberg/internal/pkg/config
|
|
||||||
#go test -race -cover -covermode=atomic github.com/thecodingmachine/gotenberg/internal/pkg/random
|
|
||||||
#go test -race -cover -covermode=atomic github.com/thecodingmachine/gotenberg/internal/pkg/standarderror
|
|
||||||
#go test -race -cover -covermode=atomic github.com/thecodingmachine/gotenberg/internal/pkg/timeout
|
|
||||||
#go test -race -cover -covermode=atomic github.com/thecodingmachine/gotenberg/internal/app/api
|
|
||||||
|
|
||||||
# Finally testing processes shutdown.
|
|
||||||
#go test github.com/thecodingmachine/gotenberg/internal/pkg/pm2 -run TestChromeShutdown
|
|
||||||
#go test github.com/thecodingmachine/gotenberg/internal/pkg/pm2 -run TestUnoconvShutdown
|
|
||||||
Reference in New Issue
Block a user