Skip to content

Commit

Permalink
Update to Python 3.12
Browse files Browse the repository at this point in the history
  • Loading branch information
timhawes committed Feb 18, 2024
1 parent 6f17b76 commit 85b6de6
Show file tree
Hide file tree
Showing 4 changed files with 42 additions and 34 deletions.
55 changes: 33 additions & 22 deletions .github/workflows/django-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,27 +15,38 @@ jobs:
strategy:
max-parallel: 4
matrix:
python-version: ["3.10", "3.11"]
python-version: ["3.10", "3.11", "3.12"]

steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
allow-prereleases: true
- name: Install Dependencies
run: |
python -m pip install --upgrade pip
python -m pip install pipenv
python -m pip install pre-commit
- name: pre-commit
run: |
pre-commit run --all-files
- name: Run Tests
run: |
pipenv sync
pipenv run python manage.py test
pipenv run python manage.py makemigrations
pipenv run python manage.py migrate
pipenv run python manage.py check

- uses: actions/checkout@v3

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}

- name: Install Dependencies
run: |
python -m pip install --upgrade pip
python -m pip install pipenv
python -m pip install pre-commit
- name: pre-commit
run: |
pre-commit run --all-files
- name: Check requirements.txt is up to date
run: |
pipenv requirements --hash >requirements.txt.new
diff -usw requirements.txt requirements.txt.new
- name: Install requirements
run: pipenv sync

- name: Run Tests
run: |
pipenv run python manage.py test
pipenv run python manage.py makemigrations
pipenv run python manage.py migrate
pipenv run python manage.py check
13 changes: 5 additions & 8 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,18 +1,15 @@
# SPDX-FileCopyrightText: 2022 Tim Hawes <[email protected]>
# SPDX-FileCopyrightText: 2024 Tim Hawes <[email protected]>
#
# SPDX-License-Identifier: CC0-1.0

FROM python:3.11
FROM python:3.12

WORKDIR /usr/src/app

COPY Pipfile Pipfile.lock ./
RUN apt-get update \
&& apt-get install -y --no-install-recommends pipenv \
&& rm -r /var/lib/apt/lists/* \
&& pipenv install --deploy --system
COPY requirements.txt .
RUN pip install --require-hashes -r requirements.txt

COPY . ./
COPY . .

ENV DJANGO_SETTINGS_MODULE=hackdb.settings_docker

Expand Down
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2022 Tim Hawes <[email protected]>
Copyright (c) 2024 Tim Hawes <[email protected]>

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

Expand Down
Loading

0 comments on commit 85b6de6

Please sign in to comment.