Skip to content

Commit

Permalink
Add collectstatic check step to githubCI
Browse files Browse the repository at this point in the history
  • Loading branch information
erdem committed Jul 9, 2024
1 parent 0df6e2b commit cfce28b
Show file tree
Hide file tree
Showing 3 changed files with 35 additions and 0 deletions.
32 changes: 32 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,3 +51,35 @@ jobs:

- name: Run black
run: poetry run black .

- name: Save workspace
uses: actions/upload-artifact@v2
with:
name: workspace
path: .venv

checks:
runs-on: ubuntu-latest
needs: linter

steps:
- name: Checkout code
uses: actions/checkout@v2

- name: Download workspace
uses: actions/download-artifact@v2
with:
name: workspace
path: .venv

- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: "3.12"

- name: Configure Poetry
run: |
poetry config virtualenvs.in-project true
- name: Collect static files
run: poetry run python manage.py collectstatic --noinput
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -79,3 +79,4 @@ node_modules/
/env3/
docker-compose.override.yml
/docs/docs/_build/*
/demo/staticfiles/
2 changes: 2 additions & 0 deletions demo/demo/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,8 @@
STATICFILES_DIRS = [
os.path.join(BASE_DIR, "static"),
]
STATICFILES_STORAGE = "django.contrib.staticfiles.storage.ManifestStaticFilesStorage"
STATIC_ROOT = os.path.join(BASE_DIR, "staticfiles")

# Default primary key field type
# https://docs.djangoproject.com/en/5.0/ref/settings/#default-auto-field
Expand Down

0 comments on commit cfce28b

Please sign in to comment.