diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 3644c6db..95567dbf 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -3,6 +3,9 @@ on: - push - pull_request +env: + CI: 1 + defaults: run: shell: bash @@ -21,7 +24,6 @@ jobs: image: redis ports: - 6379:6379 - options: --entrypoint redis-server steps: - name: Set up repo diff --git a/tin/settings/__init__.py b/tin/settings/__init__.py index 2c4ac44c..7f42e3e4 100644 --- a/tin/settings/__init__.py +++ b/tin/settings/__init__.py @@ -28,6 +28,8 @@ # SECURITY WARNING: don't run with debug turned on in production! DEBUG = True +CI = "CI" in os.environ + ALLOWED_HOSTS = [ "127.0.0.1", "localhost", @@ -234,7 +236,7 @@ CELERY_RESULT_BACKEND = "django-db" -if DEBUG: +if not CI and DEBUG: CELERY_BROKER_URL = "redis://redis:6379/0" else: CELERY_BROKER_URL = "redis://localhost:6379/1"