Skip to content

Commit d3ddd33

Browse files
committed
upgrade to Python 3.12 and Django 4.2
1 parent 8abb2b3 commit d3ddd33

File tree

4 files changed

+182
-189
lines changed

4 files changed

+182
-189
lines changed

.github/workflows/main.yml

+15-17
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Caselaw CI
1+
name: LegalDB CI
22

33
on:
44
push:
@@ -17,28 +17,27 @@ jobs:
1717
# https://devcenter.heroku.com/articles/getting-started-with-python
1818
# Match version to Heroku app
1919
# Keep in sync with Dockerfile and Pipfile
20-
- name: Set up Python 3.10
20+
- name: Set up Python 3.12
2121
uses: actions/setup-python@v5
2222
with:
23-
python-version: '3.10'
23+
python-version: '3.12'
2424

2525
- name: Install pipenv
2626
run: |
2727
pip install --upgrade pip
2828
pip install pipenv
2929
3030
- name: Install dependencies
31-
run: |
32-
pipenv sync --dev
31+
# Install _only_ [dev-packages]
32+
run: pipenv sync --categories dev-packages --system
3333

3434
- name: Run Black check
35-
run: |
36-
pipenv run black --check .
35+
run: black --check .
3736

3837
- name: Run Flake8 check
3938
run: |
4039
mkdir test-reports
41-
pipenv run flake8 . --output-file test-reports/flake8
40+
flake8 . --output-file test-reports/flake8
4241
4342
- name: Upload flake test results
4443
uses: actions/upload-artifact@v4
@@ -74,27 +73,26 @@ jobs:
7473
- name: Check out repository code
7574
uses: actions/checkout@v4
7675

77-
# https://devcenter.heroku.com/articles/getting-started-with-python
78-
# Match version to Heroku app
79-
# Keep in sync with Dockerfile and Pipfile
80-
- name: Set up Python 3.10
76+
# https://devcenter.heroku.com/articles/python-support
77+
# Match version to Heroku app
78+
# Keep in sync with Dockerfile and Pipfile
79+
- name: Set up Python 3.12
8180
uses: actions/setup-python@v5
8281
with:
83-
python-version: '3.10'
82+
python-version: '3.12'
8483

8584
- name: Install pipenv
8685
run: |
8786
pip install --upgrade pip
8887
pip install pipenv
8988
9089
- name: Install dependencies
91-
run: |
92-
pipenv sync --dev
90+
run: pipenv sync --dev --system
9391

9492
- name: Compile assets
9593
run: |
96-
pipenv run python manage.py collectstatic --no-input
97-
pipenv run python manage.py compress --force
94+
python manage.py collectstatic --no-input
95+
python manage.py compress --force
9896
9997
- name: Run tests
10098
run: pipenv run python manage.py test

Dockerfile

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
# https://docs.docker.com/engine/reference/builder/
22

33
# https://hub.docker.com/_/python/
4-
# https://devcenter.heroku.com/articles/getting-started-with-python
4+
# https://devcenter.heroku.com/articles/python-support
55
# Match version to Heroku app
66
# Keep in sync with .github/workflows/main.yml and Pipfile
7-
FROM python:3.10
7+
FROM python:3.12
88

99
# Configure apt not to prompt during docker build
1010
ARG DEBIAN_FRONTEND=noninteractive

Pipfile

+3-3
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ flake8 = "*"
1010
isort = "*"
1111

1212
[packages]
13-
Django = ">=3.2.23,<3.3"
13+
Django = ">=4.2.11,<4.3"
1414
certifi = ">=2023.7.22" # Ensure dependency is secure
1515
django-countries = "*"
1616
django-heroku = "*"
@@ -26,7 +26,7 @@ urllib3 = ">=2.0.7" # Ensure dependency is secure
2626
whitenoise = "*"
2727

2828
[requires]
29-
# https://devcenter.heroku.com/articles/getting-started-with-python
29+
# https://devcenter.heroku.com/articles/python-support
3030
# Match version to Heroku app
3131
# Keep in sync with .github/workflows/main.yml and Dockerfile
32-
python_version = "3.10"
32+
python_version = "3.12"

0 commit comments

Comments
 (0)