From 9e843af55a5e6deba3e489d8c452b1a968a6fe15 Mon Sep 17 00:00:00 2001
From: Sage Abdullah <sage.abdullah@torchbox.com>
Date: Tue, 12 Nov 2024 13:06:17 +0000
Subject: [PATCH] Test project template against Django's branches

---
 .github/workflows/test.yml | 18 ++++++++++++++++++
 1 file changed, 18 insertions(+)

diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml
index 0c98ff19ec..cd1f028ad8 100644
--- a/.github/workflows/test.yml
+++ b/.github/workflows/test.yml
@@ -153,6 +153,24 @@ jobs:
           name: coverage-data-${{ github.job }}-${{ strategy.job-index }}
           path: .coverage.*
           include-hidden-files: true
+      - name: Test project template
+        if: ${{ matrix.experimental }}
+        env:
+          PYTHONWARNINGS: error
+        run: |
+          wagtail start testproject
+          cd testproject
+          # Remove when all experimental jobs use Django >= 6.0
+          tee -a testproject/settings/local.py << EOF
+          from warnings import filterwarnings
+          filterwarnings(
+              "ignore", "The FORMS_URLFIELD_ASSUME_HTTPS transitional setting is deprecated."
+          )
+          FORMS_URLFIELD_ASSUME_HTTPS = True
+          EOF
+          python manage.py makemigrations --check --dry-run
+          python manage.py migrate
+          python manage.py check --fail-level WARNING
 
   test-mysql:
     runs-on: ubuntu-latest