Skip to content

Commit

Permalink
Merge #1591
Browse files Browse the repository at this point in the history
1591: No migrations left behind, in CI r=mythmon a=peterbe

Fixes #1590

Co-authored-by: Peter Bengtsson <[email protected]>
  • Loading branch information
bors[bot] and peterbe committed Oct 19, 2018
2 parents 5d8516a + 328dd1f commit 766d24b
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 2 deletions.
6 changes: 5 additions & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
working_directory: ~/normandy

environment:
COMPOSE_FILE: ci/docker-compose.yml
COMPOSE_FILE: ci/docker-compose.yml

steps:
- checkout
Expand Down Expand Up @@ -57,6 +57,10 @@ jobs:
name: Python Tests
command: docker-compose run web python-tests

- run:
name: Missing migrations
command: docker-compose run web migrations-check

- run:
name: Contract tests
command: |
Expand Down
9 changes: 8 additions & 1 deletion bin/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
set -eo pipefail

usage() {
echo "usage: ./bin/run.sh python-tests|js-tests|lint|start"
echo "usage: ./bin/run.sh python-tests|js-tests|lint|start|migrations-check"
exit 1
}

Expand Down Expand Up @@ -37,6 +37,13 @@ case $1 in
fi
set -e
;;
migrations-check)
./manage.py migrate
echo "Checking that all migrations have been made"
./manage.py makemigrations --check --no-input --dry-run || (
echo "You probably have migrations that need to be created" && exit 1
)
;;
python-tests)
echo "Running Python tests"
junit_path=$ARTIFACTS_PATH/test_results/python_tests
Expand Down

0 comments on commit 766d24b

Please sign in to comment.