build: run goMod in ci#2428
Conversation
| - uses: actions/setup-go@924ae3a1cded613372ab5595356fb5720e22ba16 # v6.5.0 | ||
| with: | ||
| go-version-file: collector/go.mod | ||
| - run: find . -name "go.mod" -execdir go mod tidy \; |
There was a problem hiding this comment.
Not 100% sure, but isn't this dangerous? When go mod tidy fails, the error would be swallowed? Or would we be able to see that failure in a later workflow that runs on the PR? (I think so, just checking to make sure...)
There was a problem hiding this comment.
Yes it should be seen in the build workflow like we are seeing atm.
| run: | | ||
| git config user.name "github-actions[bot]" | ||
| git config user.email "github-actions[bot]@users.noreply.github.com" | ||
| git add collector/ |
There was a problem hiding this comment.
The go sample app is not included in this, if that was intended it's fine by me though.
There was a problem hiding this comment.
Good spot, i do however think sample-apps are ok as some updates are currently working. I am inclined to leave it as is given it unblocks ci & only add the additional path if we need it & we have a way to test it.
|
@thompson-tomo I approved for now, with just 2 minor questions. Related to the first one, can we confirm that after this workflow runs and pushes the |
|
@wpessers Yes, it does trigger. If you look at thompson-tomo#109 the pr is now passing. prior to this change that pr had 1 commit & was falling. That branch is a push of the failing branch from this repo. |
This runs go mod tidy as part of the ci when go.mod/go.sum has changed and the branch is named renovate.
This has been tested in my fork where i merged these changes into main & verified that it ran as expected including resolving the build issue. This can be seen in thompson-tomo#109