From 57dd0dd13a9a3a18f0ef2a54de0e42e1bebcd6a4 Mon Sep 17 00:00:00 2001 From: srisailamkakurala Date: Sun, 29 Dec 2024 10:09:19 +0530 Subject: [PATCH] fix #1831 --- .github/workflows/tests.yml | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 7cbef817c..387133339 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -1,4 +1,3 @@ ---- name: Tests on: @@ -38,7 +37,8 @@ jobs: python-version: "${{ matrix.python-version }}" - name: Install dependencies run: | - python -m pip install --upgrade pip setuptools coveralls "tox<5" "tox-gh-actions<4" + python -m pip install --upgrade pip setuptools + python -m pip install -r requirements/tests.txt - name: Set up databases run: | PGPASSWORD="postgres" createuser -U postgres -d djangoproject --superuser -h localhost @@ -59,6 +59,18 @@ jobs: echo '"trac_db_host": "localhost", ' >> conf/secrets.json echo '"trac_db_password": "secret", ' >> conf/secrets.json echo '"secret_key": "a"}' >> conf/secrets.json + - name: Run collectstatic with ManifestStaticFilesStorage + env: + DJANGO_SETTINGS_MODULE: "djangoproject.settings.dev" + run: | + python manage.py collectstatic --noinput || ( + echo "Collectstatic failed. Debugging file paths..." + find staticfiles/ -type f -exec echo "Static file: {}" \; + exit 1 + ) + - name: Cleanup static files + run: | + rm -rf staticfiles/static - name: Run tox run: | python -m tox