Add additional checks in CI#109
Conversation
Verify that code formatting is correct and that go.mod and generated code are up to date and committed. Signed-off-by: Björn Svensson <bjorn.a.svensson@est.tech>
Signed-off-by: Björn Svensson <bjorn.a.svensson@est.tech>
Signed-off-by: Björn Svensson <bjorn.a.svensson@est.tech>
| - name: Clone the code | ||
| uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | ||
| - name: Setup Go | ||
| uses: actions/setup-go@4b73464bb391d4059bd26b0524d20df3927bd417 # v6.3.0 |
There was a problem hiding this comment.
can we add these steps as part of pre commit git hook instead of running on CICD. just thinking. if we added prehook it will not allow to commit at all.
There was a problem hiding this comment.
I'm in favour of adding the checks in both places. Users can skip pre-commit checks with --no-verify, so we would still need CI checks to validate on the server side.
There was a problem hiding this comment.
Isn't the pre-commit hook a local-only setup, i.e. a contributor need to perform additional steps to set it up?
..or is it possible to enforce it these days?
jdheyburn
left a comment
There was a problem hiding this comment.
It would be useful to have these checks in a pre-commit that developers could set up to improve DX (not waiting for failed CI builds remotely). Thanks for raising this!
Sounds good, I added #111 to track it. |
|
Triggered #112 |
Verify that code formatting is correct, and that
go.modand generated code are up to date and committed.Includes a correction of code formatting in an e2e test.