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
Add CI checks for Go code. #17066
Add CI checks for Go code. #17066
Conversation
2c9956b
to
d413a87
Compare
This adds a GHA workflow which will run `go test`, `go fmt`, and `go vet` for each Go module located under `src/go`, auto-detecting the paths to the modules and the required version of Go.
d413a87
to
2262a3a
Compare
Looks needlessly complex to me: I suggest implementing it like it was in go.d.plugin repo:
|
This approach gives us:
Handling things this way gets us a few benefits:
The build part is not yet done, all the other checks should be functionally identical to the stuff that was in the Go repo (with some apparent issue with the formatting check that I need to look into). Unless of course there are interdependencies between the steps, which would be really questionable for multiple reasons. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please address #17066 (comment). Needlessly complicated as it is now.
ee99f17
to
70e00a9
Compare
3239582
to
8eeb9b2
Compare
8eeb9b2
to
1e04848
Compare
Co-authored-by: Ilya Mashchenko <ilya@netdata.cloud>
Given the discussions in the sync today, there is little value for local testing in having a global build target to build all the Go components, and the possibility of having testing that the CMake tooling around our Go components works correctly as part of the regular CI is highly contentious (I still contend that this is something we should be testing, and that the overhead will not be problematic), so I will plan to add that in a separate PR at this point in the interest of not delaying this one any further. |
Co-authored-by: Ilya Mashchenko <ilya@netdata.cloud>
Summary
go test
,go fmt
, andgo vet
for each Go module located undersrc/go
, auto-detecting the paths to the modules and the required version of Go.Test Plan
CI passes on this PR.