New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Enable Releasing Compiled Test Binaries #3037
Comments
I think it should work if you add |
@caarlos0 Looks like the same issue builds:
- id: "smoke-tests"
binary: smoke.test
dir: ./suite/smoke
flags:
- -c
|
Also, this is a more niche case, but we tend to use Ginkgo to help write and compile our tests. Ginkgo compiles tests using builds:
- id: "smoke-tests"
binary: smoke.test
dir: ./suite/smoke
gobinary: "ginkgo"
|
ahh, I forgot about this curious though: what's the use case of releasing test binaries? |
We're working on a testing framework that includes its own suite of default tests, ones that we'd like other projects to be able to quickly download and utilize without having to clone our repo. |
Added two more options to the builds section: - command: allow to override the command being run. E.g. instead of `go build`, one could run `go test -c` by setting gobinary, command and flags, respectively. - no_main_check: by default, goreleaser will fail if there's no main function. This option allows to disable that check. This PR effectively make GoReleaser able to release Go test binaries instead of just "regular" binaries. closes #3037 Signed-off-by: Carlos A Becker <caarlos0@gmail.com>
* feat: add builds.no_main_check and builds.command Added two more options to the builds section: - command: allow to override the command being run. E.g. instead of `go build`, one could run `go test -c` by setting gobinary, command and flags, respectively. - no_main_check: by default, goreleaser will fail if there's no main function. This option allows to disable that check. This PR effectively make GoReleaser able to release Go test binaries instead of just "regular" binaries. closes #3037 Signed-off-by: Carlos A Becker <caarlos0@gmail.com> * test: fix broken tests Signed-off-by: Carlos A Becker <caarlos0@gmail.com>
Is your feature request related to a problem? Please describe.
I'd like to release some binaries of my compiled tests, usually achieved with the following command.
go test -c ./path/to/tests -o binary.name
I'd love to use goreleaser for this, but it seems to lack this option. I tried using
with no luck.
Describe the solution you'd like
Enable an option like
Describe alternatives you've considered
Right now it looks like I'm going to be explicitly compiling these test binaries and using something like this tool to release them.
Search
Code of Conduct
Additional context
No response
The text was updated successfully, but these errors were encountered: