Skip to content

Commit 05df5e1

Browse files
committed
add a github action check to ensure collectstatic runs
1 parent 3627bc8 commit 05df5e1

File tree

1 file changed

+29
-0
lines changed

1 file changed

+29
-0
lines changed

.github/workflows/static.yml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
name: Check collectstatic
2+
on: [push, pull_request]
3+
jobs:
4+
test:
5+
runs-on: ubuntu-latest
6+
steps:
7+
- name: Check out repository
8+
uses: actions/checkout@v4
9+
- uses: actions/setup-python@v5
10+
with:
11+
python-version: 3.12.6
12+
- name: Cache Python dependencies
13+
uses: actions/cache@v4
14+
env:
15+
cache-name: pythondotorg-cache-pip
16+
with:
17+
path: ~/.cache/pip
18+
key: ${{ runner.os }}-${{ github.job }}-${{ env.cache-name }}-${{ hashFiles('requirements.txt', '*-requirements.txt') }}
19+
restore-keys: |
20+
${{ runner.os }}-${{ github.job }}-${{ env.cache-name }}-
21+
${{ runner.os }}-${{ github.job }}-
22+
${{ runner.os }}-
23+
- name: Install Python dependencies
24+
run: |
25+
pip install -U pip setuptools wheel
26+
pip install -r dev-requirements.txt
27+
- name: Run Tests
28+
run: |
29+
DJANGO_SETTINGS_MODULE=pydotorg.settings.static python manage.py collectstatic --noinput

0 commit comments

Comments
 (0)