Skip to content

Commit 4b04cf4

Browse files
committed
Add uv into actions
1 parent 16672c0 commit 4b04cf4

File tree

1 file changed

+13
-9
lines changed

1 file changed

+13
-9
lines changed

.github/workflows/python-tests.yml

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,10 @@ on:
1313
branches:
1414
- "main"
1515

16+
env:
17+
UV_LOCKED: "true"
18+
UV_SYSTEM_PYTHON: "true"
19+
1620
jobs:
1721
run-tests-and-coverage:
1822
name: "Run nox for tests and coverage"
@@ -41,13 +45,13 @@ jobs:
4145
python-version: "${{ matrix.python-version }}"
4246
allow-prereleases: true
4347

44-
- name: "Install nox"
48+
- name: "Install uv"
4549
run: |
46-
python -m pip install --upgrade pip nox
50+
python -m pip install --upgrade pip uv
4751
4852
- name: "Run tests and coverage via nox"
4953
run: |
50-
nox --session version_coverage-${{ matrix.python-version }}
54+
uv run nox --session version_coverage-${{ matrix.python-version }}
5155
5256
- name: "Save coverage artifact"
5357
uses: "actions/upload-artifact@6f51ac03b9356f520e9adb1b1b7802705f340c2b"
@@ -70,9 +74,9 @@ jobs:
7074
with:
7175
python-version: "3.12"
7276

73-
- name: "Install nox"
77+
- name: "Install uv"
7478
run: |
75-
python -m pip install --upgrade pip nox
79+
python -m pip install --upgrade pip uv
7680
7781
- name: "Download coverage artifacts"
7882
uses: "actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16"
@@ -82,7 +86,7 @@ jobs:
8286

8387
- name: "Compile coverage data, print report"
8488
run: |
85-
nox --session coverage_combine
89+
uv run nox --session coverage_combine
8690
export TOTAL=$(python -c "import json;print(json.load(open('coverage.json'))['totals']['percent_covered_display'])")
8791
echo "TOTAL=$TOTAL" >> $GITHUB_ENV
8892
echo "### Total coverage: ${TOTAL}%" >> $GITHUB_STEP_SUMMARY
@@ -99,10 +103,10 @@ jobs:
99103
with:
100104
python-version: "3.12"
101105

102-
- name: "Install nox"
106+
- name: "Install uv"
103107
run: |
104-
python -m pip install --upgrade pip nox
108+
python -m pip install --upgrade pip uv
105109
106110
- name: "Enforce strict type annotations with mypy"
107111
run: |
108-
nox --session mypy
112+
uv run nox --session mypy

0 commit comments

Comments
 (0)