Skip to content
This repository has been archived by the owner on Aug 16, 2024. It is now read-only.

Hotfix for upstream dependency's incompatibility with Django 4.1 #31

Merged
merged 8 commits into from
Nov 5, 2022
Merged
Show file tree
Hide file tree
Changes from 6 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 32 additions & 6 deletions .github/workflows/ci_cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,15 @@ jobs:

steps:
- uses: actions/checkout@v2
- name: Set up Python 3.10.4
uses: actions/setup-python@v2
with:
python-version: 3.10.4
- name: Run image
- name: Install poetry
uses: abatilo/[email protected]
with:
poetry-version: 1.2.1
- name: Set up Python 3.10.4
uses: actions/setup-python@v4
with:
python-version: 3.10.4
cache: poetry
- name: Install dependencies
run: |
poetry install
Expand All @@ -33,14 +34,39 @@ jobs:
poetry run python manage.py migrate
poetry run python manage.py netlify_build

test_static_assets:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- name: Install poetry
uses: abatilo/[email protected]
with:
poetry-version: 1.2.1
- name: Set up Python 3.10.4
uses: actions/setup-python@v4
with:
python-version: 3.10.4
cache: poetry
- name: Install dependencies
run: |
poetry install

- name: Test Collecting Static Assets
run: |
poetry run python manage.py migrate
poetry run python manage.py collectstatic --noinput
poetry run python manage.py assets build

lint:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- name: Set up Python 3.10.4
uses: actions/setup-python@v2
uses: actions/setup-python@v4
with:
python-version: 3.10.4
- uses: pre-commit/[email protected]
4 changes: 4 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -23,3 +23,7 @@ WORKDIR /app
COPY poetry.lock poetry.lock
COPY pyproject.toml pyproject.toml
RUN poetry install --no-interaction --no-ansi

# HOTFIX FOR https://github.com/miracle2k/django-assets/issues/102
RUN sed -i "s/requires_system_checks = False/requires_system_checks = []/" \
$(poetry show -v 2> /dev/null | head -n1 | cut -d ' ' -f 3)/lib/python3.10/site-packages/django_assets/management/commands/assets.py
1 change: 1 addition & 0 deletions bin/post_compile
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
# File path should be ./bin/post_compile
# (.sh extension added in Gist just to enable shell syntax highlighting.
# https://discussion.heroku.com/t/django-automaticlly-run-syncdb-and-migrations-after-heroku-deploy-with-a-buildpack-or-otherwise/466/7
set -e

echo "=> Building Static Files..."
python manage.py collectstatic --noinput
Expand Down