Skip to content
This repository was archived by the owner on Jan 29, 2025. It is now read-only.

Commit 766d24b

Browse files
bors[bot]peterbe
andcommitted
Merge #1591
1591: No migrations left behind, in CI r=mythmon a=peterbe Fixes #1590 Co-authored-by: Peter Bengtsson <[email protected]>
2 parents 5d8516a + 328dd1f commit 766d24b

File tree

2 files changed

+13
-2
lines changed

2 files changed

+13
-2
lines changed

.circleci/config.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ jobs:
1313
working_directory: ~/normandy
1414

1515
environment:
16-
COMPOSE_FILE: ci/docker-compose.yml
16+
COMPOSE_FILE: ci/docker-compose.yml
1717

1818
steps:
1919
- checkout
@@ -57,6 +57,10 @@ jobs:
5757
name: Python Tests
5858
command: docker-compose run web python-tests
5959

60+
- run:
61+
name: Missing migrations
62+
command: docker-compose run web migrations-check
63+
6064
- run:
6165
name: Contract tests
6266
command: |

bin/run.sh

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
set -eo pipefail
33

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

@@ -37,6 +37,13 @@ case $1 in
3737
fi
3838
set -e
3939
;;
40+
migrations-check)
41+
./manage.py migrate
42+
echo "Checking that all migrations have been made"
43+
./manage.py makemigrations --check --no-input --dry-run || (
44+
echo "You probably have migrations that need to be created" && exit 1
45+
)
46+
;;
4047
python-tests)
4148
echo "Running Python tests"
4249
junit_path=$ARTIFACTS_PATH/test_results/python_tests

0 commit comments

Comments
 (0)