Use in-memory cache for CI tests

This commit is contained in:
Mouse Reeve 2022-01-05 09:51:00 -08:00
parent 66456fc508
commit 2cad762646
2 changed files with 5 additions and 0 deletions

View file

@ -47,6 +47,7 @@ jobs:
CELERY_BROKER: "" CELERY_BROKER: ""
REDIS_BROKER_PORT: 6379 REDIS_BROKER_PORT: 6379
REDIS_BROKER_PASSWORD: beep REDIS_BROKER_PASSWORD: beep
USE_LOCAL_CACHE: true
FLOWER_PORT: 8888 FLOWER_PORT: 8888
EMAIL_HOST: "smtp.mailgun.org" EMAIL_HOST: "smtp.mailgun.org"
EMAIL_PORT: 587 EMAIL_PORT: 587

View file

@ -130,6 +130,10 @@ CACHES = {
}, },
} }
} }
if env("USE_LOCAL_CACHE", False):
# use the default local memory cache for testing
CACHE = None
SESSION_ENGINE = "django.contrib.sessions.backends.cache" SESSION_ENGINE = "django.contrib.sessions.backends.cache"
SESSION_CACHE_ALIAS = "default" SESSION_CACHE_ALIAS = "default"