ci: add db migrations checks to tests and build workflows (#3920)
* ci: add db migrations checks to tests and build workflows * ci: refactor migrations check expression * chore: rework conditional and exit Co-authored-by: Robert Sparks <rjsparks@nostrum.com>
This commit is contained in:
parent
19796c56c9
commit
f778058005
4
.github/workflows/build.yml
vendored
4
.github/workflows/build.yml
vendored
|
@ -128,6 +128,10 @@ jobs:
|
|||
run: |
|
||||
echo "Running checks..."
|
||||
./ietf/manage.py check
|
||||
echo "Validating migrations..."
|
||||
if ! (ietf/manage.py makemigrations 2>&1 | grep -q "^No changes detected$") ; then
|
||||
echo -e "\nModel changes without migrations found." ; exit 1
|
||||
fi
|
||||
echo "Running tests..."
|
||||
./ietf/manage.py test --settings=settings_sqlitetest
|
||||
coverage xml
|
||||
|
|
4
.github/workflows/ci-run-tests.yml
vendored
4
.github/workflows/ci-run-tests.yml
vendored
|
@ -40,6 +40,10 @@ jobs:
|
|||
run: |
|
||||
echo "Running checks..."
|
||||
./ietf/manage.py check
|
||||
echo "Validating migrations..."
|
||||
if ! (ietf/manage.py makemigrations 2>&1 | grep -q "^No changes detected$") ; then
|
||||
echo -e "\nModel changes without migrations found." ; exit 1
|
||||
fi
|
||||
echo "Running tests..."
|
||||
./ietf/manage.py test --settings=settings_sqlitetest
|
||||
coverage xml
|
||||
|
|
Loading…
Reference in a new issue