CI: track missing migrations

This commit is contained in:
Martin Pépin 2019-10-06 20:34:04 +02:00
parent b005e772ea
commit 46da197507
No known key found for this signature in database
GPG key ID: E7520278B1774448

View file

@ -59,3 +59,21 @@ linters:
key: linters key: linters
paths: paths:
- vendor/ - vendor/
# Check whether there are some missing migrations.
migration_checks:
stage: test
before_script:
- mkdir -p vendor/{pip,apt}
- apt-get update -q && apt-get -o dir::cache::archives="vendor/apt" install -yqq postgresql-client
- cp cof/settings/secret_example.py cof/settings/secret.py
- pip install --upgrade -r requirements.txt
- python --version
script: python manage.py makemigrations --dry-run --check
services:
# this should not be necessary…
- postgres:9.6
cache:
key: migration_checks
paths:
- vendor/