Skip to content

Commit f805383

Browse files
authored
Fix CI (#78)
* Fix CI * Use uv tool for coverage * Indents matter
1 parent 6c63404 commit f805383

File tree

1 file changed

+26
-30
lines changed

1 file changed

+26
-30
lines changed

.github/workflows/ci.yml

+26-30
Original file line numberDiff line numberDiff line change
@@ -56,13 +56,13 @@ jobs:
5656
- uses: hynek/setup-cached-uv@v2
5757

5858
- name: Prepare & run Nox
59-
run: |
60-
uv pip install --system nox "tomli; python_version<'3.11'"
61-
python -Im nox \
62-
--python ${{ matrix.python-version }} \
63-
--sessions tests \
64-
-- \
65-
--installpkg dist/*.whl
59+
run: >
60+
uvx
61+
--with "tomli; python_version<'3.11'"
62+
nox
63+
--python ${{ matrix.python-version }}
64+
--sessions tests
65+
-- --installpkg dist/*.whl
6666
6767
- name: Upload coverage data
6868
uses: actions/upload-artifact@v4
@@ -92,16 +92,16 @@ jobs:
9292

9393
- name: Combine coverage & fail if it's <100%.
9494
run: |
95-
uv pip install --system --upgrade coverage[toml]
95+
uv tool install coverage[toml]
9696
97-
python -Im coverage combine
98-
python -Im coverage html --skip-covered --skip-empty
97+
coverage combine
98+
coverage html --skip-covered --skip-empty
9999
100100
# Report and write to summary.
101-
python -Im coverage report --format=markdown >> $GITHUB_STEP_SUMMARY
101+
coverage report --format=markdown >> $GITHUB_STEP_SUMMARY
102102
103103
# Report again and fail if under 100%.
104-
python -Im coverage report --fail-under=100
104+
coverage report --fail-under=100
105105
106106
- name: Upload HTML report if check failed.
107107
uses: actions/upload-artifact@v4
@@ -132,19 +132,21 @@ jobs:
132132
allow-prereleases: true
133133
- uses: hynek/setup-cached-uv@v2
134134

135-
- run: uv pip install --system nox "tomli; python_version<'3.11'"
136-
137135
- name: Check using Mypy
138-
run: |
139-
python -Im nox \
140-
--python ${{ matrix.python-version }} \
141-
--sessions mypy_api
136+
run: >
137+
uvx
138+
--with "tomli; python_version<'3.11'"
139+
nox
140+
--python ${{ matrix.python-version }}
141+
--sessions mypy_api
142142
143143
- name: Check using Pyright
144-
run: |
145-
python -Im nox \
146-
--python ${{ matrix.python-version }} \
147-
--sessions pyright_api
144+
run: >
145+
uvx
146+
--with "tomli; python_version<'3.11'"
147+
nox
148+
--python ${{ matrix.python-version }}
149+
--sessions pyright_api
148150
149151
mypy-pkg:
150152
name: Type-check package
@@ -164,10 +166,7 @@ jobs:
164166
- uses: hynek/setup-cached-uv@v2
165167

166168
- name: Prepare & run Nox
167-
run: |
168-
uv pip install --system nox
169-
python -Im nox \
170-
--sessions mypy_pkg
169+
run: uvx nox --sessions mypy_pkg
171170

172171
docs:
173172
name: Build docs & run doctests
@@ -187,10 +186,7 @@ jobs:
187186
- uses: hynek/setup-cached-uv@v2
188187

189188
- name: Prepare & run Nox
190-
run: |
191-
uv pip install --system nox
192-
python -Im nox \
193-
--session docs
189+
run: uvx nox --session docs
194190

195191
install-dev:
196192
name: Verify dev env

0 commit comments

Comments
 (0)