Skip to content

Commit

Permalink
Check collectstatic (#2554)
Browse files Browse the repository at this point in the history
* add a github action check to ensure collectstatic runs

* install prod reqs

* fallback to .python-version

* explicitly set python-version-file

---------

Co-authored-by: Jacob Coffee <[email protected]>
  • Loading branch information
ewdurbin and JacobCoffee authored Sep 13, 2024
1 parent 68fa4c1 commit 38d9d55
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ jobs:
sudo dpkg -i pandoc-2.17.1.1-1-amd64.deb
- uses: actions/setup-python@v5
with:
python-version: 3.12.6
python-version-file: '.python-version'
- name: Cache Python dependencies
uses: actions/cache@v4
env:
Expand Down
29 changes: 29 additions & 0 deletions .github/workflows/static.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: Check collectstatic
on: [push, pull_request]
jobs:
test:
runs-on: ubuntu-latest
steps:
- name: Check out repository
uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version-file: '.python-version'
- name: Cache Python dependencies
uses: actions/cache@v4
env:
cache-name: pythondotorg-cache-pip
with:
path: ~/.cache/pip
key: ${{ runner.os }}-${{ github.job }}-${{ env.cache-name }}-${{ hashFiles('requirements.txt', '*-requirements.txt') }}
restore-keys: |
${{ runner.os }}-${{ github.job }}-${{ env.cache-name }}-
${{ runner.os }}-${{ github.job }}-
${{ runner.os }}-
- name: Install Python dependencies
run: |
pip install -U pip setuptools wheel
pip install -r requirements.txt -r prod-requirements.txt
- name: Run Tests
run: |
DJANGO_SETTINGS_MODULE=pydotorg.settings.static python manage.py collectstatic --noinput

0 comments on commit 38d9d55

Please sign in to comment.