Use DEBUG=False for testing collectstatic in CI

pull/11651/head
Sage Abdullah 2024-02-15 10:54:53 +00:00 zatwierdzone przez Matt Westcott
rodzic 263d3c6a1c
commit f372cf1ba4
3 zmienionych plików z 3 dodań i 2 usunięć

Wyświetl plik

@ -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

Wyświetl plik

@ -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")

Wyświetl plik

@ -1,7 +1,6 @@
from .settings import * # noqa: F403
# Settings meant to run the test suite with Djangos development server, for integration tests.
DEBUG = True
DATABASES["default"]["NAME"] = "ui_tests.db" # noqa: F405