Skip to content
This repository was archived by the owner on Oct 6, 2025. It is now read-only.

Conversation

@fiam
Copy link
Contributor

@fiam fiam commented Aug 26, 2025

This enables running unit tests in pull requests and after merging
to main or tagging a new release.

This enables running unit tests in pull requests and after merging
to main or tagging a new release.
@fiam fiam marked this pull request as ready for review August 26, 2025 20:42
Dockerfile Outdated
WORKDIR /src
RUN --mount=target=. \
--mount=target=/root/.cache,type=cache \
CGO_ENABLED=1 go test -race -v ./...
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why not make unit-tests?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good question! make unit-tests does not call the tests with the race detector enabled (which can catch some issues), and I was afraid to change it and break something else that I was missing (enabling the race detector requires cgo and gcc). Happy to change the unit-tests target and use it if there are no objections.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the explanation! I didn't know enabling race detector requires cgo and gcc. I vote to merge it now then, as it's already an improvement.
Once we are confident that using make unit-tests will not break something else we can add a follow up pr

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As discussed, we've decided that adding the race detector was safe enough to do it in this PR. Thanks for the feedback!

@fiam fiam merged commit 6ece744 into docker:main Aug 27, 2025
4 checks passed
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants