I'm trying to run the tests of my Django app in Gitlab CI/CD. The process fails every time with an error: django.core.exceptions.ImproperlyConfigured: The SECRET_KEY setting must not be empty.
.
I assume this is because I have not my .env file available in the repository and that file contains for example the SECRET_KEY
-variable which is then used in the settings.py
like this: SECRET_KEY = os.getenv('SECRET_KEY')
.
So what would be the proper way to set these variables so my tests would pass?