fixed cicd

Signed-off-by: Jochen Mehlich <contact@jochenmehlich.de>
This commit is contained in:
Jochen Mehlich 2023-11-29 15:04:00 +01:00
parent 9253e22c0c
commit 17af3560da
2 changed files with 3 additions and 5 deletions

View File

@ -31,8 +31,8 @@ migrations:
stage: build stage: build
script: script:
- python3 manage.py makemigrations - python3 manage.py makemigrations
- python3 manage.py migrate - python3 manage.py migrate --database=test
- python3 manage.py check - python3 manage.py check --database=test
django-tests: 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. # 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 - 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 # use python3 explicitly. see https://wiki.ubuntu.com/Python/3
- python3 manage.py test - python3 manage.py test --database=test

View File

@ -134,5 +134,3 @@ STATIC_URL = '/static/'
DEFAULT_AUTO_FIELD = 'django.db.models.BigAutoField' DEFAULT_AUTO_FIELD = 'django.db.models.BigAutoField'
if os.environ.get("DJANGO_CONFIG")=="test":
from .settings_test import *