Skip to content

go: Add go.test to run a project's Go tests - #286

Merged
martinpitt merged 1 commit into
amutable-systems:mainfrom
daandemeyer:push-ypzuzvvkrmzz
Oct 9, 2026
Merged

martinpitt merged 1 commit into
amutable-systems:mainfrom
daandemeyer:push-ypzuzvvkrmzz

Conversation

@daandemeyer

Copy link
Copy Markdown
Member

A Go project's tests have no rule in tine. A consumer runs go test in a
relaxed box, where go downloads the modules again and compiles the project a
second time. Add test_packages to go.package. The build action compiles the
tests of those packages with go test -c, using the go build cache that the
build of the binaries already filled. go.test runs the test binaries in the
package's box without network.

Signed-off-by: Daan De Meyer daan@amutable.com

A Go project's tests have no rule in tine. A consumer runs go test in a
relaxed box, where go downloads the modules again and compiles the project a
second time. Add test_packages to go.package. The build action compiles the
tests of those packages with go test -c, using the go build cache that the
build of the binaries already filled. go.test runs the test binaries in the
package's box without network.

Signed-off-by: Daan De Meyer <daan@amutable.com>

@martinpitt martinpitt left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Sweet!

@martinpitt
martinpitt merged commit d208618 into amutable-systems:main Oct 9, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants