Enable frozen mode when CI environment variable is set
This would be a good enhancement that automatically enforces that annotations are up to date if people run db:migrate in a CI system!
The CI env var is set when running in a CI system: https://stackoverflow.com/a/64289573/7983959
Therefore, running db:migrate in a CI like Github Actions would cause a failure (good) when annotations are out of date
Hi @ivangreene thanks for submitting a suggestion. I've seen a few variations for having annotations checked in CI that seem to work well, that do something along the lines of:
- Run migrations OR run annotations
- Check the exit code or output
- If 0 then succeed
- If not 0 then fail
I'm curious -- in your experience, would checks like this suffice? If not, I would love to learn more about your use case. There are so many different CI tools that I would want to come up with a general approach that works for most, if not all, CI systems.
The solution we ultimately used was to simply run the annotaterb command on it's own in CI, with the --frozen flag
I have down time, so I'm tidying up issues and PRs. This seems like it's been resolved so closing for now. Feel free to re-open this if I misunderstood.