You can use build tags to limit builds, including tests, to a certain subset of files: https://dave.cheney.net/2014/09/28/using-build-to-switch-between-debug-and-release
For example, you could put //+build integration
at the top of your integration test files, and then those would only be built and executed when you run go test -tags integration
.