Skip to content

Commit 49592d7

Browse files
committed
chore: add matrix to run on both 3.12 and 3.13
1 parent 8189ec8 commit 49592d7

File tree

2 files changed

+48
-7
lines changed

2 files changed

+48
-7
lines changed

.github/workflows/ci.yaml

Lines changed: 27 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -37,11 +37,32 @@ jobs:
3737
- name: Check wheels can be built
3838
run: hatch build
3939

40-
- name: Run tests (codebase)
41-
run: hatch run tests
42-
43-
- name: Run tests (examples)
44-
run: hatch run examples:tests
45-
4640
- name: Check doctests
4741
run: hatch run docs:test
42+
43+
test-python-matrix:
44+
runs-on: "ubuntu-latest"
45+
strategy:
46+
matrix:
47+
python-version: ["3.12", "3.13"]
48+
steps:
49+
- name: Checkout source code
50+
uses: actions/checkout@v4
51+
52+
- name: Set up Python ${{ matrix.python-version }}
53+
uses: actions/setup-python@v5
54+
with:
55+
python-version: ${{ matrix.python-version }}
56+
cache: "pip"
57+
58+
- name: Install hatch
59+
run: pip install hatch
60+
61+
- name: Start LocalNet
62+
run: pipx install algokit && algokit localnet start
63+
64+
- name: Run tests with Python ${{ matrix.python-version }}
65+
run: hatch run test:ci
66+
67+
- name: Run examples tests with Python ${{ matrix.python-version }}
68+
run: hatch run examples:tests

pyproject.toml

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ classifiers = [
1818
"Topic :: Software Development :: Testing",
1919
"Programming Language :: Python",
2020
"Programming Language :: Python :: 3.12",
21+
"Programming Language :: Python :: 3.13",
2122
]
2223
dependencies = [
2324
# ==========================================================================
@@ -44,7 +45,7 @@ allow-direct-references = true
4445
packages = ["src/algopy", 'src/algopy_testing', 'src/_algopy_testing']
4546

4647
[[tool.hatch.envs.all.matrix]]
47-
python = ["3.12"]
48+
python = ["3.12", "3.13"]
4849

4950
# default dev environment
5051
[tool.hatch.envs.default]
@@ -124,6 +125,25 @@ dependencies = [
124125
[tool.hatch.envs.cicd.scripts]
125126
clean_dist = "rm -rf dist"
126127

128+
# Testing environment with matrix
129+
[tool.hatch.envs.test]
130+
dependencies = [
131+
"pytest>=7.4",
132+
"pytest-mock>=3.10.0",
133+
"pytest-xdist[psutil]>=3.3",
134+
"pytest-cov>=4.1.0",
135+
"py-algorand-sdk>=2.4.0",
136+
"algokit-utils>=3.0.0",
137+
"puyapy>=3.0",
138+
]
139+
140+
[tool.hatch.envs.test.scripts]
141+
run = "pytest --cov=src --cov-report=xml {args}"
142+
ci = "pytest --cov=src --cov-report=xml --cov-report=term"
143+
144+
[[tool.hatch.envs.test.matrix]]
145+
python = ["3.12", "3.13"]
146+
127147
# docs environment
128148
[tool.hatch.envs.docs]
129149
path = ".venv.docs"

0 commit comments

Comments
 (0)