Skip to content

Commit 2b13229

Browse files
committed
fix uv usage in ci
1 parent 3a8bd97 commit 2b13229

File tree

2 files changed

+15
-6
lines changed

2 files changed

+15
-6
lines changed

.github/workflows/tests.yaml

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,10 @@ jobs:
3737
tox-env: "py311"
3838
- version: "3.12"
3939
tox-env: "py312"
40+
- version: "3.13"
41+
tox-env: "py313"
42+
- version: "3.14"
43+
tox-env: "py314"
4044
runs-on: ${{ matrix.os }}
4145

4246
steps:
@@ -76,8 +80,11 @@ jobs:
7680
- name: Set up Python
7781
run: uv python install 3.12
7882

83+
- name: Create virtual environment
84+
run: uv venv
85+
7986
- name: Install coverage
80-
run: uv pip install --system coverage[toml]
87+
run: uv pip install coverage[toml]
8188

8289
# Download all coverage artifacts from matrix jobs
8390
- name: Download coverage data
@@ -89,12 +96,12 @@ jobs:
8996
# Combine all .coverage.* files into one .coverage database
9097
- name: Combine coverage data
9198
run: |
92-
python -Im coverage combine
93-
python -Im coverage html
94-
python -Im coverage json
99+
uv run python -Im coverage combine
100+
uv run python -Im coverage html
101+
uv run python -Im coverage json
95102
96103
# Export total coverage percentage for badge
97-
export TOTAL=$(python -c "import json;print(json.load(open('coverage.json'))['totals']['percent_covered_display'])")
104+
export TOTAL=$(uv run python -c "import json;print(json.load(open('coverage.json'))['totals']['percent_covered_display'])")
98105
echo "total=$TOTAL" >> $GITHUB_ENV
99106
echo "### Total coverage: ${TOTAL}%" >> $GITHUB_STEP_SUMMARY
100107
@@ -103,7 +110,7 @@ jobs:
103110
run: |
104111
echo "## Coverage Report" >> $GITHUB_STEP_SUMMARY
105112
echo "\`\`\`" >> $GITHUB_STEP_SUMMARY
106-
python -Im coverage report --format=markdown >> $GITHUB_STEP_SUMMARY
113+
uv run python -Im coverage report --format=markdown >> $GITHUB_STEP_SUMMARY
107114
echo "\`\`\`" >> $GITHUB_STEP_SUMMARY
108115
109116
# Upload HTML coverage report as artifact for debugging

pyproject.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@ classifiers = [
2020
"Programming Language :: Python :: 3.10",
2121
"Programming Language :: Python :: 3.11",
2222
"Programming Language :: Python :: 3.12",
23+
"Programming Language :: Python :: 3.13",
24+
"Programming Language :: Python :: 3.14",
2325
]
2426
dependencies = ["packaging"]
2527

0 commit comments

Comments
 (0)