Detect if generated files are up to date in CI
- Detect if
build/repositories.bzl
is out of date.make update-repos
syncs it withgo.mod
. - Detect if generated mocks are out of date.
make regenerate-mocks
regenerates them. - Detect if generated gRPC/protobuf files are out of date.
make regenerate-proto
regenerates them.
To do the above, as part of the test job and before the tests are ran, run those commands and see if git diff
reports any changes. If there are changes/new files - print the diff and fail the build. Print a suggestion on how to fix the issue.
Edited by Mikhail Mazurskiy