diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 8fcf9966..0f150d07 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -59,3 +59,21 @@ linters: key: linters paths: - 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/