Skip to content

Commit

Permalink
chore: re-lock poetry, update CI
Browse files Browse the repository at this point in the history
Add python12 environment, re-lock poetry
to use newer tox that supports python12 properly
and fix CI to run tox instead of pytest directly
  • Loading branch information
iharthi committed Jan 8, 2024
1 parent 0b0894d commit 0ce2189
Show file tree
Hide file tree
Showing 7 changed files with 1,109 additions and 1,160 deletions.
9 changes: 5 additions & 4 deletions .github/workflows/python-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ jobs:
- "3.8"
- "3.9"
- "3.10"
- "3.11"
- "3.12"

steps:
- uses: actions/checkout@v2
Expand All @@ -29,8 +31,6 @@ jobs:
python-version: ${{ matrix.python-version }}
- name: Add poetry
uses: abatilo/actions-poetry@v2.1.4
with:
poetry-version: "1.2.2"
- name: Install dependencies
run: |
python -m pip install --upgrade pip setuptools
Expand All @@ -42,9 +42,10 @@ jobs:
- name: Test with tox
run: |
poetry run make coverage
poetry run test-all
- name: Code Coverage Summary Report
- if: ${{ matrix.python-version == '3.12' }}
name: Code Coverage Summary Report
uses: irongut/CodeCoverageSummary@v1.0.2
with:
filename: coverage.xml
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/python-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
- name: Add poetry
uses: abatilo/actions-poetry@v2.1.4
with:
poetry-version: "1.2.2"
poetry-version: "1.7.1"
- name: Install dependencies
run: poetry install
- name: Build and publish
Expand Down
4 changes: 4 additions & 0 deletions HISTORY.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@
History
=======

1.0.2 (2024-01-08)

* Add support for django 5

1.0.1 (2023-01-13)
------------------

Expand Down
2 changes: 2 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,8 @@ test:
test-all:
tox

test-full: lint coverage

coverage:
pytest --cov=tg_utils --cov-report xml --cov-report html --cov-report term-missing

Expand Down
2,236 changes: 1,086 additions & 1,150 deletions poetry.lock

Large diffs are not rendered by default.

3 changes: 1 addition & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "tg-utils"
version = "1.0.1"
version = "1.0.2"
description = "Common utils for Django-based projects."
authors = ["Thorgate <code@thorgate.eu>"]
license = "ISCL"
Expand Down Expand Up @@ -55,7 +55,6 @@ prospector = "^1.7.0"
pylint = "==2.14.*"
sphinx = "==3.*"
tox = "*"
tox-poetry = "*"
tox-gh-actions = "*"

django-compressor = "*"
Expand Down
13 changes: 10 additions & 3 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -3,26 +3,33 @@ isolated_build = True
envlist =
py37-django{22,30,31,32}
py{38,39}-django{22,30,31,32,40}
py310-django{32,40}
py{310,311}-django{32,40,41,42,50}
py{312}-django{42,50}

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

[testenv]
setenv =
PYTHONPATH = {toxinidir}
whitelist_externals=make
allowlist_externals=make
commands=make test

deps=
django22: Django>=2.2,<2.3
django30: Django>=3.0,<3.1
django31: Django>=3.1,<3.2
django32: Django>=3.2,<3.3
django40: Django>=4.0,<4.1
django41: Django>=4.1,<4.2
django42: Django>=4.2,<4.3
django50: Django>=5.0,<5.1

[testenv:py310-django40]
[testenv:py312-django50]
commands = make test-full

0 comments on commit 0ce2189

Please # to comment.