From f372cf1ba4b0677f651000362a2b99cfcbb588fa Mon Sep 17 00:00:00 2001 From: Sage Abdullah Date: Thu, 15 Feb 2024 10:54:53 +0000 Subject: [PATCH] Use DEBUG=False for testing collectstatic in CI --- .circleci/config.yml | 2 ++ wagtail/test/settings.py | 2 +- wagtail/test/settings_ui.py | 1 - 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 23248e8804..9fa60607fe 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -66,6 +66,7 @@ jobs: environment: PIPENV_VENV_IN_PROJECT: true DJANGO_SETTINGS_MODULE: wagtail.test.settings_ui + DJANGO_DEBUG: true steps: - checkout - attach_workspace: @@ -110,6 +111,7 @@ jobs: - run: command: pipenv run ./wagtail/test/manage.py collectstatic --noinput environment: + DJANGO_DEBUG: false STATICFILES_STORAGE: manifest - store_test_results: path: ./reports/jest diff --git a/wagtail/test/settings.py b/wagtail/test/settings.py index b82d731c96..03fda5e2d9 100644 --- a/wagtail/test/settings.py +++ b/wagtail/test/settings.py @@ -3,7 +3,7 @@ import os from django.contrib.messages import constants as message_constants from django.utils.translation import gettext_lazy as _ -DEBUG = False +DEBUG = os.environ.get("DJANGO_DEBUG", "false").lower() == "true" WAGTAIL_ROOT = os.path.dirname(os.path.dirname(__file__)) WAGTAILADMIN_BASE_URL = "http://testserver" STATIC_ROOT = os.path.join(WAGTAIL_ROOT, "tests", "test-static") diff --git a/wagtail/test/settings_ui.py b/wagtail/test/settings_ui.py index 269cddf5e4..31aea0e1f8 100644 --- a/wagtail/test/settings_ui.py +++ b/wagtail/test/settings_ui.py @@ -1,7 +1,6 @@ from .settings import * # noqa: F403 # Settings meant to run the test suite with Django’s development server, for integration tests. -DEBUG = True DATABASES["default"]["NAME"] = "ui_tests.db" # noqa: F405