diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 5776565..8710fc0 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -31,8 +31,8 @@ migrations: stage: build script: - python3 manage.py makemigrations - - python3 manage.py migrate - - python3 manage.py check + - python3 manage.py migrate --database=test + - python3 manage.py check --database=test django-tests: @@ -41,5 +41,5 @@ django-tests: # The MYSQL user only gets permissions for MYSQL_DB, so Django can't create a test database. - echo "GRANT ALL on *.* to '${MYSQL_USER}';"| mysql -u root --password="${MYSQL_ROOT_PASSWORD}" -h mysql # use python3 explicitly. see https://wiki.ubuntu.com/Python/3 - - python3 manage.py test + - python3 manage.py test --database=test diff --git a/quoteMe/settings.py b/quoteMe/settings.py index 7d84454..c6719e7 100644 --- a/quoteMe/settings.py +++ b/quoteMe/settings.py @@ -134,5 +134,3 @@ STATIC_URL = '/static/' DEFAULT_AUTO_FIELD = 'django.db.models.BigAutoField' -if os.environ.get("DJANGO_CONFIG")=="test": - from .settings_test import *