Are external modules used exclusively in test packages, compiled in release build?

For instance, I want to use the go-cmp package but I only need it in tests. Will it be included in compiled binary if I never use it outside tests?

Test files (files ending with *_test.go) are treated differently during compilation. They are linked separately and can access internal packages like go-cmp used for testing purposes.