Browse Source

run collectstatic with ManifestStaticFilesStorage

Matt Westcott 2 years ago
parent
commit
5f9314393c
2 changed files with 10 additions and 1 deletions
  1. 4 1
      .circleci/config.yml
  2. 6 0
      wagtail/test/settings.py

+ 4 - 1
.circleci/config.yml

@@ -102,7 +102,10 @@ jobs:
           command: npm run test:integration -- --runInBand --reporters=default --reporters=jest-junit
           environment:
             JEST_JUNIT_OUTPUT_DIR: reports/jest
-      - run: pipenv run ./wagtail/test/manage.py collectstatic --noinput
+      - run:
+          command: pipenv run ./wagtail/test/manage.py collectstatic --noinput
+          environment:
+            STATICFILES_STORAGE: manifest
       - store_test_results:
           path: ./reports/jest
 

+ 6 - 0
wagtail/test/settings.py

@@ -54,6 +54,12 @@ STATICFILES_FINDERS = (
     "django.contrib.staticfiles.finders.AppDirectoriesFinder",
 )
 
+if os.environ.get("STATICFILES_STORAGE", "") == "manifest":
+    STATICFILES_STORAGE = (
+        "django.contrib.staticfiles.storage.ManifestStaticFilesStorage"
+    )
+
+
 USE_TZ = not os.environ.get("DISABLE_TIMEZONE")
 if not USE_TZ:
     print("Timezone support disabled")  # noqa