Skip to content

Commit f2ae228

Browse files
authored
Declare 3.13 support (#12)
1 parent d5bfc28 commit f2ae228

File tree

4 files changed

+67
-33
lines changed

4 files changed

+67
-33
lines changed

.github/workflows/check.yml

Lines changed: 46 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -14,41 +14,64 @@ concurrency:
1414

1515
jobs:
1616
test:
17-
name: Run ${{ matrix.tox_env }} on ${{ matrix.os }}
18-
runs-on: ${{ matrix.os }}
17+
name: test ${{ matrix.py }}
18+
runs-on: ubuntu-latest
1919
strategy:
2020
fail-fast: false
2121
matrix:
22-
tox_env:
22+
py:
23+
- "3.13"
2324
- "3.12"
2425
- "3.11"
2526
- "3.10"
2627
- "3.9"
28+
steps:
29+
- name: Install the latest version of uv
30+
uses: astral-sh/setup-uv@v2
31+
with:
32+
enable-cache: true
33+
github-token: ${{ secrets.GITHUB_TOKEN }}
34+
- name: setup python for tox
35+
uses: actions/setup-python@v5
36+
with:
37+
python-version: "3.12"
38+
- name: install tox
39+
run: uv pip install tox tox-uv --system
40+
- uses: actions/checkout@v4
41+
- name: setup python for test ${{ matrix.py }}
42+
uses: actions/setup-python@v5
43+
with:
44+
python-version: ${{ matrix.py }}
45+
allow-prereleases: true
46+
- name: setup test suite
47+
run: tox run -vv --notest --skip-missing-interpreters false -e ${{ matrix.py }}
48+
- name: run test suite
49+
run: tox run --skip-pkg-install -e ${{ matrix.py }}
50+
51+
check:
52+
name: tox env ${{ matrix.tox_env }}
53+
runs-on: ubuntu-latest
54+
strategy:
55+
fail-fast: false
56+
matrix:
57+
tox_env:
2758
- type
2859
- dev
2960
- readme
30-
os:
31-
- ubuntu-latest
32-
- windows-latest
33-
- macos-latest
3461
steps:
35-
- name: Set up uv for tox
36-
uses: yezz123/setup-uv@v4
37-
- name: Set up python for tox
62+
- name: Install the latest version of uv
63+
uses: astral-sh/setup-uv@v2
64+
with:
65+
enable-cache: true
66+
github-token: ${{ secrets.GITHUB_TOKEN }}
67+
- uses: actions/checkout@v4
68+
- name: setup Python 3.12
3869
uses: actions/setup-python@v5
3970
with:
4071
python-version: "3.12"
41-
- name: Install tox-uv
72+
- name: install tox
4273
run: uv pip install tox tox-uv --system
43-
- name: Checkout source code
44-
uses: actions/checkout@v4
45-
- name: Set up ${{ startsWith(matrix.tox_env, '3.') && matrix.tox_env || '3.12' }} for test
46-
uses: actions/setup-python@v5
47-
with:
48-
python-version: ${{ startsWith(matrix.tox_env, '3.') && matrix.tox_env || '3.12' }}
49-
- name: Set up test environment
50-
run: tox -vv -e ${{ matrix.tox_env }} --notest
51-
- name: Run test environment
52-
run: tox -e ${{ matrix.tox_env }} --skip-pkg-install
53-
env:
54-
PYTEST_ADDOPTS: "-vv --showlocals"
74+
- name: Setup test suite
75+
run: tox -vv --notest --skip-missing-interpreters false -e ${{ matrix.tox_env }}
76+
- name: Run test suite
77+
run: tox --skip-pkg-install -e ${{ matrix.tox_env }}

.github/workflows/release.yml

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,17 @@ jobs:
1616
uses: actions/setup-python@v5
1717
with:
1818
python-version: "3.12"
19+
- name: Install the latest version of uv
20+
uses: astral-sh/setup-uv@v2
21+
with:
22+
enable-cache: true
23+
github-token: ${{ secrets.GITHUB_TOKEN }}
1924
- name: Install build
20-
run: python -m pip install build
25+
run: uv pip install build[uv] --system
2126
- uses: actions/checkout@v4
2227
with:
2328
fetch-depth: 0
2429
- name: Build package
25-
run: pyproject-build -s -w . -o dist
30+
run: pyproject-build --installer uv --sdist --wheel . --outdir dist
2631
- name: Publish to PyPI
2732
uses: pypa/[email protected]

pyproject.toml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,13 +27,14 @@ classifiers = [
2727
"Programming Language :: Python :: 3.10",
2828
"Programming Language :: Python :: 3.11",
2929
"Programming Language :: Python :: 3.12",
30+
"Programming Language :: Python :: 3.13",
3031
]
3132
dynamic = [
3233
"version",
3334
]
3435
dependencies = [
3536
"pre-commit>=3.8",
36-
"uv>=0.2.33",
37+
"uv>=0.4.7",
3738
]
3839
optional-dependencies.test = [
3940
"covdefaults>=2.3",
@@ -101,6 +102,9 @@ lint.preview = true
101102
builtin = "clear,usage,en-GB_to_en-US"
102103
count = true
103104

105+
[tool.pyproject-fmt]
106+
max_supported_python = "3.13"
107+
104108
[tool.pytest]
105109
ini_options.testpaths = [
106110
"tests",

tox.ini

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
11
[tox]
22
requires =
3-
tox>=4.17.1
3+
tox>=4.2
4+
tox-uv>=1.11.3
45
env_list =
56
fix
67
type
78
readme
9+
3.13
810
3.12
911
3.11
1012
3.10
@@ -34,15 +36,15 @@ commands =
3436
description = run static analysis and style check using flake8
3537
skip_install = true
3638
deps =
37-
pre-commit>=3.8
39+
pre-commit-uv>=4.1
3840
commands =
3941
pre-commit run --all-files --show-diff-on-failure
4042
python -c 'print("hint: run {envdir}/bin/pre-commit install to add checks as pre-commit hook")'
4143

4244
[testenv:type]
4345
description = run type check on code base
4446
deps =
45-
mypy==1.11.1
47+
mypy==1.11.2
4648
set_env =
4749
{tty:MYPY_FORCE_COLOR = 1}
4850
commands =
@@ -53,13 +55,13 @@ commands =
5355
description = check that the long description is valid
5456
skip_install = true
5557
deps =
56-
build[uv]>=1.2.1
58+
build[uv]>=1.2.2
5759
check-wheel-contents>=0.6
5860
twine>=5.1.1
5961
commands =
60-
python -m build --installer uv --sdist --wheel -o {envtmpdir} .
61-
twine check {envtmpdir}/*
62-
check-wheel-contents {envtmpdir}
62+
pyproject-build --installer uv --outdir {envtmpdir} --sdist --wheel .
63+
twine check {envtmpdir}{/}*
64+
check-wheel-contents --no-config {envtmpdir}
6365

6466
[testenv:dev]
6567
description = generate a DEV environment

0 commit comments

Comments
 (0)