Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[fix] Add GitHub Actions to Catch Static Files Issues Early #1855

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 14 additions & 2 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
---
name: Tests

on:
Expand Down Expand Up @@ -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
Expand All @@ -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
Expand Down