From ce112b303acaebd60eddb3759bd53ab405f7189d Mon Sep 17 00:00:00 2001 From: srisailamkakurala Date: Sun, 29 Dec 2024 06:21:13 +0530 Subject: [PATCH] fix #1831 --- .github/workflows/tests.yml | 16 ++++++++++++++-- requirements/tests.txt | 1 + 2 files changed, 15 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 diff --git a/requirements/tests.txt b/requirements/tests.txt index 5360a5200..5714767b2 100644 --- a/requirements/tests.txt +++ b/requirements/tests.txt @@ -1,4 +1,5 @@ -r dev.txt +coveralls coverage==7.6.9 requests-mock==1.12.1 tox<5.0.0