Skip to content

Add a Content-Security-Policy in Report-Only mode (refs #3041) (#3042) #1792

Add a Content-Security-Policy in Report-Only mode (refs #3041) (#3042)

Add a Content-Security-Policy in Report-Only mode (refs #3041) (#3042) #1792

Workflow file for this run

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@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
with:
persist-credentials: false
- uses: actions/setup-python@ece7cb06caefa5fff74198d8649806c4678c61a1 # v6.3.0
with:
python-version-file: '.python-version'
- name: Cache Python dependencies
uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0
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