[tooling]: Enforce in CI generation of gen.go files #1456
Conversation
ea8c4d6 to
5f02bae
Compare
| - name: Check migrations | ||
| run: ./test/migrations/up_and_down.sh | ||
|
|
||
| generated-files: |
There was a problem hiding this comment.
Sounds like this belongs to repository hygiene. Also put the script in the makefile, and delete the hashfiles?
There was a problem hiding this comment.
I wanted to avoid having it in the Makefile, because it's going to generate the files, and therefor change the state of the repo/files with a check. Is it really ok to do so?
(And locally / in the Makefile, running the check will fix it, so that not really a check ^^')
There was a problem hiding this comment.
Well, if there is a change, we are a in a dirty state and should fail. BTW we could make that explicit by not using hashes but checking if there is any local change (e.g. git diff --exit-code).
So what about doing:
make apis
git diff --exit-code
There was a problem hiding this comment.
And also move it to repo hygiene (i.e. a step in hygiene-tests)
There was a problem hiding this comment.
I did it but
- It will check more than generated files
- It may be influenced by previous steps generating some change for some reasons
so I don't think that the "correctest" approach.
1ff87ab to
28dda10
Compare
28dda10 to
226ab68
Compare
This PR follows #1455
It does enforce that *.gen.go files have been generated and don't change.
Minor side fix on docker run command, that set
-itfor no reason and that make it failing in ci. Changed to--rmbecause locally it's building up useless containers quickly.