From f04519f900080da00d890cd3efb9c667f9b39ce5 Mon Sep 17 00:00:00 2001 From: Pascal F Date: Mon, 1 Apr 2024 10:33:12 +0200 Subject: [PATCH] update django supported version --- .github/workflows/test.yml | 18 +++++++------ .../locales/en/LC_MESSAGES/django.po | 3 ++- .../locales/kl/LC_MESSAGES/django.po | 2 +- tox.ini | 27 +++++++++++++++++++ 4 files changed, 40 insertions(+), 10 deletions(-) create mode 100644 tox.ini diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index d2cd112..765f5ef 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -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 @@ -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 diff --git a/sample_project/locales/en/LC_MESSAGES/django.po b/sample_project/locales/en/LC_MESSAGES/django.po index e90feca..0f985a6 100644 --- a/sample_project/locales/en/LC_MESSAGES/django.po +++ b/sample_project/locales/en/LC_MESSAGES/django.po @@ -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 \n" "Language-Team: LANGUAGE \n" @@ -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!" diff --git a/sample_project/locales/kl/LC_MESSAGES/django.po b/sample_project/locales/kl/LC_MESSAGES/django.po index e1eae1e..cf1b02c 100644 --- a/sample_project/locales/kl/LC_MESSAGES/django.po +++ b/sample_project/locales/kl/LC_MESSAGES/django.po @@ -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 \n" "Language-Team: LANGUAGE \n" diff --git a/tox.ini b/tox.ini new file mode 100644 index 0000000..0afe161 --- /dev/null +++ b/tox.ini @@ -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