Skip to content

Commit cfce28b

Browse files
committed
Add collectstatic check step to githubCI
1 parent 0df6e2b commit cfce28b

File tree

3 files changed

+35
-0
lines changed

3 files changed

+35
-0
lines changed

.github/workflows/ci.yml

+32
Original file line numberDiff line numberDiff line change
@@ -51,3 +51,35 @@ jobs:
5151

5252
- name: Run black
5353
run: poetry run black .
54+
55+
- name: Save workspace
56+
uses: actions/upload-artifact@v2
57+
with:
58+
name: workspace
59+
path: .venv
60+
61+
checks:
62+
runs-on: ubuntu-latest
63+
needs: linter
64+
65+
steps:
66+
- name: Checkout code
67+
uses: actions/checkout@v2
68+
69+
- name: Download workspace
70+
uses: actions/download-artifact@v2
71+
with:
72+
name: workspace
73+
path: .venv
74+
75+
- name: Set up Python
76+
uses: actions/setup-python@v2
77+
with:
78+
python-version: "3.12"
79+
80+
- name: Configure Poetry
81+
run: |
82+
poetry config virtualenvs.in-project true
83+
84+
- name: Collect static files
85+
run: poetry run python manage.py collectstatic --noinput

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -79,3 +79,4 @@ node_modules/
7979
/env3/
8080
docker-compose.override.yml
8181
/docs/docs/_build/*
82+
/demo/staticfiles/

demo/demo/settings.py

+2
Original file line numberDiff line numberDiff line change
@@ -135,6 +135,8 @@
135135
STATICFILES_DIRS = [
136136
os.path.join(BASE_DIR, "static"),
137137
]
138+
STATICFILES_STORAGE = "django.contrib.staticfiles.storage.ManifestStaticFilesStorage"
139+
STATIC_ROOT = os.path.join(BASE_DIR, "staticfiles")
138140

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

0 commit comments

Comments
 (0)