babylonchain / finality-provider

A peripheral program run by the finality providers
Other
14 stars 25 forks source link

make sure `mock-gen` always runs when there is an interface update #344

Closed bap2pecs closed 1 month ago

bap2pecs commented 1 month ago

318 has some issue that i later fixed in #335

but the CI/CD pipeline failed to detect it b/c it didn't run make mock-gen

bap2pecs commented 1 month ago
image

@gitferry @SebastianElvis found another miss. probably need to prioritize this.

two solutions: 1) add a Git hook to always run make mock-gen before a push to remote 2) add a test to run make mock-gen and throw if the old and new file doesn't match

SebastianElvis commented 1 month ago

Agreed to 1) run make mock-gen before make test and 2) check mock objects in CI pipeline. Probably let's do 1) first (this is immediately actionable) then do 2) at a later point (this needs some scripting)?

bap2pecs commented 1 month ago

actually i was talking to @gitferry on my PR and we agreed that 1) is actually the thing we should avoid. CI should not run mockgen itself but alert if the author forgot to run it