mirror of https://github.com/zulip/zulip.git
travis: Test whether migrations are consistent with models.
This should automatically catch mistakes where someone updates the database models but forgets to generate migrations afterwards.
This commit is contained in:
parent
5ef57a07e1
commit
24fd3bbf55
|
@ -16,6 +16,7 @@ function run {
|
|||
|
||||
run ./tools/clean-repo
|
||||
run ./tools/lint-all
|
||||
run ./tools/test-migrations
|
||||
run ./tools/test-js-with-node
|
||||
run ./tools/test-backend
|
||||
run ./tools/test-js-with-casper
|
||||
|
|
|
@ -0,0 +1,10 @@
|
|||
#!/bin/bash
|
||||
set -e
|
||||
echo 'Testing whether migrations are consistent with models'
|
||||
if ./manage.py makemigrations -e --dry-run; then
|
||||
echo
|
||||
echo 'ERROR: Migrations are not consistent with models! Fix with `./manage.py makemigrations`.'
|
||||
echo
|
||||
else
|
||||
echo "Success! Migrations are consistent with models."
|
||||
fi
|
|
@ -6,3 +6,4 @@ export PATH=$PATH:/srv/zulip-venv/bin
|
|||
./tools/lint-all
|
||||
./tools/test-backend
|
||||
./tools/test-management
|
||||
./tools/test-migrations
|
||||
|
|
Loading…
Reference in New Issue