diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 42f8472ea..ed08f4b7f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -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: diff --git a/.github/workflows/static.yml b/.github/workflows/static.yml new file mode 100644 index 000000000..3207b964e --- /dev/null +++ b/.github/workflows/static.yml @@ -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