Update CI to check data migrations for conflicts #1368
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What are the relevant tickets?
Closes #1352
Description (What does it do?)
Adds
RUN_DATA_MIGRATIONS=True
in front of the poetry command to make migrations, which we use to check if there's missing migrations. This makes it include thedata_fixtures
app and thus will check for missing migrations there too (unlikely) or for conflicting migrations in that app (much more likely).How can this be tested?
Add a couple migrations with the same serial number to the
data_fixtures
app. (I just added a single empty one, then cut and pasted it.)Run
./scripts/test/detect_missing_migrations.sh
from theweb
container. It should fail.If you commit these migrations to the branch (or to a sub-branch), it should also fail when the GitHub action runs. (Don't forget to revert the commit if you did it to this branch!)