Skip to content

Commit

Permalink
Test for missing migrations
Browse files Browse the repository at this point in the history
  • Loading branch information
atodorov committed Jan 15, 2019
1 parent c804a63 commit 8da3061
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,11 @@ jobs:
packages:
- graphviz

- stage: non_functional_testing
env:
- TEST_DB=SQLite
- CMD=test_for_missing_migrations

- stage: docker
env:
- CMD=test-docker-image
Expand Down
7 changes: 7 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,13 @@ test:
PYTHONWARNINGS=d coverage run --source='.' ./manage.py test --noinput --settings=$(DJANGO_SETTINGS_MODULE); \
fi

# test for missing migrations
# https://stackoverflow.com/questions/54177838/
.PHONY: test_for_missing_migrations
test_for_missing_migrations:
./manage.py migrate --settings=$(DJANGO_SETTINGS_MODULE)
./manage.py makemigrations --check --settings=$(DJANGO_SETTINGS_MODULE)

.PHONY: check
check: flake8 test

Expand Down

0 comments on commit 8da3061

Please sign in to comment.