Skip to content
This repository was archived by the owner on Oct 6, 2025. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -47,3 +47,10 @@ RUN --mount=target=/context \
exit 1
fi
EOT

FROM base AS test
RUN apk add --no-cache make gcc musl-dev
WORKDIR /src
RUN --mount=target=. \
--mount=target=/root/.cache,type=cache \
CGO_ENABLED=1 make unit-tests
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ mock:

unit-tests:
@echo "Running unit tests..."
@go test -v ./...
@go test -race -v ./...
@echo "Unit tests completed!"

clean:
Expand Down
11 changes: 10 additions & 1 deletion docker-bake.hcl
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,10 @@ group "default" {
}

group "validate" {
targets = ["validate-docs"]
targets = [
"validate-docs",
"validate-tests"
]
}

target "validate-docs" {
Expand All @@ -37,3 +40,9 @@ target "update-docs" {
target = "docs-update"
output = ["./docs/reference"]
}

target "validate-tests" {
inherits = ["_common"]
target = "test"
output = ["type=cacheonly"]
}
Loading