Skip to content

Commit c0f4491

Browse files
authored
Fix CI (#650)
* Fix CI for prereleases * Use uv tool for coverage * typo
1 parent b265c7a commit c0f4491

File tree

1 file changed

+29
-14
lines changed

1 file changed

+29
-14
lines changed

.github/workflows/ci.yml

Lines changed: 29 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -51,9 +51,12 @@ jobs:
5151
python-version: ${{ matrix.python-version }}
5252
allow-prereleases: true
5353
- uses: hynek/setup-cached-uv@v2
54-
- run: uv pip install --system tox-uv
5554

56-
- run: python -Im tox run --installpkg dist/*.whl -f py$(echo ${{ matrix.python-version }} | tr -d .)
55+
- run: >
56+
uvx --with=tox-uv
57+
tox run
58+
--installpkg dist/*.whl
59+
-f py$(echo ${{ matrix.python-version }} | tr -d .)
5760
5861
- name: Upload coverage data
5962
uses: actions/upload-artifact@v4
@@ -82,14 +85,16 @@ jobs:
8285

8386
- name: Combine coverage & fail if it's <100%.
8487
run: |
85-
python -Im coverage combine
86-
python -Im coverage html --skip-covered --skip-empty
88+
uv tool install 'coverage[toml]'
89+
90+
coverage combine
91+
coverage html --skip-covered --skip-empty
8792
8893
# Report and write to summary.
89-
python -Im coverage report --format=markdown >> $GITHUB_STEP_SUMMARY
94+
coverage report --format=markdown >> $GITHUB_STEP_SUMMARY
9095
9196
# Report again and fail if under 100%.
92-
python -Im coverage report --fail-under=100
97+
coverage report --fail-under=100
9398
9499
- name: Upload HTML report if check failed.
95100
uses: actions/upload-artifact@v4
@@ -115,9 +120,12 @@ jobs:
115120
python-version-file: .python-version-default
116121
allow-prereleases: true
117122
- uses: hynek/setup-cached-uv@v2
118-
- run: uv pip install --system tox-uv
119123

120-
- run: python -Im tox run --installpkg dist/*.whl -e mypy-pkg
124+
- run: >
125+
uvx --with=tox-uv
126+
tox run
127+
--installpkg dist/*.whl
128+
-e mypy-pkg
121129
122130
pyright:
123131
name: Pyright
@@ -136,9 +144,12 @@ jobs:
136144
python-version-file: .python-version-default
137145
allow-prereleases: true
138146
- uses: hynek/setup-cached-uv@v2
139-
- run: uv pip install --system tox-uv
140147

141-
- run: python -Im tox run --installpkg dist/*.whl -e pyright
148+
- run: >
149+
uvx --with=tox-uv
150+
tox run
151+
--installpkg dist/*.whl
152+
-e pyright
142153
143154
docs:
144155
name: Build docs & run doctests
@@ -156,9 +167,11 @@ jobs:
156167
# Keep in sync with tox.ini/docs & .readthedocs.yaml
157168
python-version: "3.12"
158169
- uses: hynek/setup-cached-uv@v2
159-
- run: uv pip install --system tox-uv
160170

161-
- run: python -Im tox run -e docs
171+
- run: >
172+
uvx --with=tox-uv
173+
tox run
174+
-e docs
162175
163176
install-dev:
164177
name: Verify dev env
@@ -212,6 +225,8 @@ jobs:
212225
with:
213226
python-version-file: .python-version-default
214227
- uses: hynek/setup-cached-uv@v2
215-
- run: uv pip install --system tox-uv
216228

217-
- run: python -Im tox run -f color
229+
- run: >
230+
uvx --with=tox-uv
231+
tox run
232+
-f color

0 commit comments

Comments
 (0)