Skip to content

Commit

Permalink
update django supported version
Browse files Browse the repository at this point in the history
  • Loading branch information
pfouque committed Apr 29, 2024
1 parent 5a655a0 commit f04519f
Show file tree
Hide file tree
Showing 4 changed files with 40 additions and 10 deletions.
18 changes: 10 additions & 8 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,20 +13,17 @@ jobs:
strategy:
fail-fast: false
matrix:
python-version: ["3.8", "3.9", "3.10", "3.11"]
django-version: ["3.2", "4.1", "4.2"]
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]

steps:
- name: Install gettext
run: |
sudo apt-get update && sudo apt-get install -y gettext
- name: Check out the repository
uses: actions/checkout@v4
- uses: actions/checkout@v4

- uses: snok/install-poetry@v1
with:
# version: 1.3.2
virtualenvs-create: true
virtualenvs-in-project: true

Expand All @@ -44,13 +41,18 @@ jobs:
- name: Install requirements
run: poetry install

- name: Install django ${{ matrix.django-version }}
run: poetry add "django@~=${{ matrix.django-version }}"
# - name: Install django ${{ matrix.django-version }}
# run: poetry add "django@~=${{ matrix.django-version }}"

- name: Django check
run: poetry run python manage.py check

- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install tox tox-gh-actions
- name: Run tests
run: poetry run pytest --verbose
run: tox
env:
FORCE_COLOR: true
3 changes: 2 additions & 1 deletion sample_project/locales/en/LC_MESSAGES/django.po
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2023-03-12 06:37+0000\n"
"POT-Creation-Date: 2024-04-29 07:02+0000\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
Expand All @@ -17,6 +17,7 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"

#: sample_project/templates/default_urlconf.html:7
#: sample_project/templates/default_urlconf.html:221
msgid "The install worked successfully! Congratulations!"
Expand Down
2 changes: 1 addition & 1 deletion sample_project/locales/kl/LC_MESSAGES/django.po
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2023-03-12 06:37+0000\n"
"POT-Creation-Date: 2024-04-29 07:02+0000\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
Expand Down
27 changes: 27 additions & 0 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
[tox]
envlist =
py{38,39,310,311}-dj42
py{310,311,312}-dj50
skipsdist = True

[testenv]
deps =
dj42: Django==4.2
dj50: Django==5.0
translate-toolkit
pytest
pytest-django
pytest-cov

commands = {posargs:python -m pytest}

[flake8]
max-line-length = 130

[gh-actions]
python =
3.8: py38
3.9: py39
3.10: py310
3.11: py311
3.12: py312

0 comments on commit f04519f

Please sign in to comment.