Compare commits
1
Commits
next
..
ad056556b0
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
ad056556b0 |
+3
-7
@@ -62,17 +62,13 @@ RUN yarn build
|
|||||||
# ships and the alpine one does not. -timeout 90s is a backstop above
|
# ships and the alpine one does not. -timeout 90s is a backstop above
|
||||||
# the 60-second cap on the suite. The rerun with -v only shows details:
|
# the 60-second cap on the suite. The rerun with -v only shows details:
|
||||||
# the step fails however it ends, because the first run already failed.
|
# the step fails however it ends, because the first run already failed.
|
||||||
# Go's module and build caches are in memory (tmpfs) for the go test
|
|
||||||
# step alone, so the image make test tags does not carry them and the
|
|
||||||
# build spends no time writing them into it. They start empty on every
|
|
||||||
# build, so no stored test result can stand in for a run.
|
|
||||||
# golang:1.25.7-trixie, 2026-10-07
|
# golang:1.25.7-trixie, 2026-10-07
|
||||||
FROM golang@sha256:2b174ffcf56c7ad0c47d30d2630693265639ddf2a5141149c2da34db921791b4 AS test
|
FROM golang@sha256:2b174ffcf56c7ad0c47d30d2630693265639ddf2a5141149c2da34db921791b4 AS test
|
||||||
WORKDIR /src
|
WORKDIR /src
|
||||||
|
COPY backend/go.mod backend/go.sum ./
|
||||||
|
RUN go mod download
|
||||||
COPY backend/ .
|
COPY backend/ .
|
||||||
RUN --mount=type=tmpfs,target=/go/pkg/mod \
|
RUN go test -timeout 90s -race -cover ./... || \
|
||||||
--mount=type=tmpfs,target=/root/.cache/go-build \
|
|
||||||
go test -timeout 90s -race -cover ./... || \
|
|
||||||
{ echo "--- Rerunning with -v for details ---"; \
|
{ echo "--- Rerunning with -v for details ---"; \
|
||||||
go test -timeout 90s -race -v ./...; exit 1; }
|
go test -timeout 90s -race -v ./...; exit 1; }
|
||||||
# Nothing is wanted from the frontend stage; the copy is what makes
|
# Nothing is wanted from the frontend stage; the copy is what makes
|
||||||
|
|||||||
Reference in New Issue
Block a user