Skip to content

Commit 82cb556

Browse files
committed
WIP
1 parent 4b04cf4 commit 82cb556

File tree

1 file changed

+29
-16
lines changed

1 file changed

+29
-16
lines changed

.github/workflows/python-tests.yml

Lines changed: 29 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ name: "python tests and coverage"
44
# https://github.com/actions/checkout : 11bd71901bbe5b1630ceea73d27597364c9af683
55
# https://github.com/actions/download-artifact : fa0a91b85d4f404e444e00e005971372dc801d16
66
# https://github.com/actions/upload-artifact : 6f51ac03b9356f520e9adb1b1b7802705f340c2b
7+
# https://github.com/astral-sh/setup-uv : 1edb52594c857e2b5b13128931090f0640537287
78

89
on:
910
pull_request:
@@ -14,8 +15,8 @@ on:
1415
- "main"
1516

1617
env:
18+
UV_PYTHON_PREFERENCE: "only-system"
1719
UV_LOCKED: "true"
18-
UV_SYSTEM_PYTHON: "true"
1920

2021
jobs:
2122
run-tests-and-coverage:
@@ -25,15 +26,15 @@ jobs:
2526
fail-fast: false
2627
matrix:
2728
os:
28-
- "macos-latest"
29+
# - "macos-latest"
2930
- "windows-latest"
3031
- "ubuntu-latest"
3132
python-version:
3233
- "3.9"
33-
- "3.10"
34-
- "3.11"
35-
- "3.12"
36-
- "3.13"
34+
# - "3.10"
35+
# - "3.11"
36+
# - "3.12"
37+
# - "3.13"
3738

3839
steps:
3940
- name: "Repo checkout"
@@ -45,9 +46,12 @@ jobs:
4546
python-version: "${{ matrix.python-version }}"
4647
allow-prereleases: true
4748

48-
- name: "Install uv"
49-
run: |
50-
python -m pip install --upgrade pip uv
49+
- name: "Install the latest version of uv"
50+
uses: "astral-sh/setup-uv@1edb52594c857e2b5b13128931090f0640537287"
51+
with:
52+
version: "latest"
53+
python-version: "${{ matrix.python-version }}"
54+
enable-cache: true
5155

5256
- name: "Run tests and coverage via nox"
5357
run: |
@@ -74,18 +78,24 @@ jobs:
7478
with:
7579
python-version: "3.12"
7680

77-
- name: "Install uv"
78-
run: |
79-
python -m pip install --upgrade pip uv
81+
- name: "Install the latest version of uv"
82+
uses: "astral-sh/setup-uv@1edb52594c857e2b5b13128931090f0640537287"
83+
with:
84+
version: "latest"
85+
python-version: "3.12"
86+
enable-cache: true
8087

8188
- name: "Download coverage artifacts"
8289
uses: "actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16"
8390
with:
8491
pattern: "coverage-artifact-*"
8592
merge-multiple: true
8693

87-
- name: "Compile coverage data, print report"
94+
- name: "Compile coverage data"
8895
run: |
96+
pwd
97+
tree src/
98+
8999
uv run nox --session coverage_combine
90100
export TOTAL=$(python -c "import json;print(json.load(open('coverage.json'))['totals']['percent_covered_display'])")
91101
echo "TOTAL=$TOTAL" >> $GITHUB_ENV
@@ -103,9 +113,12 @@ jobs:
103113
with:
104114
python-version: "3.12"
105115

106-
- name: "Install uv"
107-
run: |
108-
python -m pip install --upgrade pip uv
116+
- name: "Install the latest version of uv"
117+
uses: "astral-sh/setup-uv@1edb52594c857e2b5b13128931090f0640537287"
118+
with:
119+
version: "latest"
120+
python-version: "3.12"
121+
enable-cache: true
109122

110123
- name: "Enforce strict type annotations with mypy"
111124
run: |

0 commit comments

Comments
 (0)