-
-
Notifications
You must be signed in to change notification settings - Fork 665
35 lines (31 loc) · 1.13 KB
/
static.yml
File metadata and controls
35 lines (31 loc) · 1.13 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
name: Check collectstatic
on: [push, pull_request, workflow_dispatch]
permissions: {}
jobs:
collectstatic:
if: github.event_name != 'push' || github.event.repository.fork == true || github.ref == 'refs/heads/main'
runs-on: ubuntu-latest
steps:
- name: Check out repository
uses: actions/checkout@v6
- uses: actions/setup-python@v6
with:
python-version-file: '.python-version'
- name: Cache Python dependencies
uses: actions/cache@v5
env:
cache-name: pythondotorg-cache-pip
with:
path: ~/.cache/pip
key: ${{ runner.os }}-${{ github.job }}-${{ env.cache-name }}-${{ hashFiles('pyproject.toml') }}
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 '.[prod]'
- name: Run Tests
run: |
DJANGO_SETTINGS_MODULE=pydotorg.settings.static python manage.py collectstatic --noinput