-
Notifications
You must be signed in to change notification settings - Fork 344
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
chore(ci): regen docs & add generate workflow to test make generate
#3409
Conversation
@squakez @phantomjinx @oscerd Could anybody review this? |
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.
Nice idea!
.github/workflows/generate.yml
Outdated
uses: actions/setup-go@v1 | ||
with: | ||
# make generate requires Go >=1.17 | ||
go-version: 1.17.x |
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.
We're still on 1.16. We may need to wait #2845 before merging this.
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.
Yes, but it just runs test with make generate
and doesn't commit any changes to the repo, so it should be safe to go ahead to merge it. And after all make generate
hasn't been working with Go 1.16.x so there's no reason to worry about backward compatibility on it.
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.
doesn't commit any changes to the repo
I thought it was adding the generate doc back to the repo. Can you please clarify what the action does?
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.
Yeah, the workflow just tests make generate
; it makes sure the target runs fine, as I found this target is fragile and easy to be in a state of not working, e.g. it doesn't run with Go 1.16 or sometimes go mod tidy
has tidied up too much of go.mod
. We discover that only when we try to run the target. This workflow should find such breaking changes earlier.
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.
Okey, so, the idea of the action is to run it just to report any problem, not to generate on behalf of the user. I'd call it verify-generate
to avoid creating confusion on the goal of the action.
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.
Thanks, the suggested name is better. In the future, it might be worth adding the 'real' generate workflow that automatically generates docs for us. But let's do it another time.
Release Note