33 push :
44 branches : [main]
55 pull_request :
6+ types :
7+ - opened
8+ - synchronize
9+ - reopened
10+ - ready_for_review
611 workflow_dispatch :
712
813concurrency :
1318 FORCE_COLOR : " 3"
1419 UVX_CONSTRAINT : requirements/lock/uvx-tools.txt
1520 UVX_COMMAND : uvx -crequirements/lock/uvx-tools.txt
21+ <<<<<<< before updating
1622 EXTRA_PYTHON_VERSIONS : " pypy-3.11"
23+ =======
24+ NOX_COMMAND : uvx -crequirements/lock/uvx-tools.txt nox
25+ # EXTRA_PYTHON_VERSIONS: "pypy-3.11"
26+ >>>>>>> after updating
1727
1828permissions : {}
1929
2434 outputs :
2535 should_skip : ${{ steps.skip_check.outputs.should_skip }}
2636 steps :
37+ - name : Don't run CI on draft PR
38+ if :
39+ github.event_name == 'pull_request' && github.event.pull_request.draft
40+ == true
41+ run : exit 1
42+
2743 - id : skip_check
2844 uses : fkirc/skip-duplicate-actions@f75f66ce1886f00957d99748a42c724f4330bdcf # v5.3.1
2945 with :
6985 print("{minmax_default_python_versions=}")
7086 print("{all_python_version=}")
7187
72-
7388 with open(os.getenv("GITHUB_OUTPUT"), "a") as f:
7489 f.write(f"{default_python_version=:s}\n")
7590 f.write(f"{min_python_version=:s}\n")
@@ -153,6 +168,12 @@ jobs:
153168 matrix :
154169 os :
155170 - ubuntu-latest
171+ <<<<<<< before updating
172+ =======
173+ # - windows-latest
174+ session :
175+ - typecheck
176+ >>>>>>> after updating
156177 steps :
157178 - uses : actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
158179 with :
@@ -162,14 +183,16 @@ jobs:
162183 python-version-file : " .python-version"
163184 cache-dependency-path : uv.lock
164185 - name : Get python version
186+ id : python_version
165187 run : |
166188 python_version=$(cat .python-version)
167- echo "python_version=${python_version}" >> "$GITHUB_ENV "
189+ echo "python_version=${python_version}" >> "$GITHUB_OUTPUT "
168190 shell : bash
169191 - name : typecheck
170192 env :
171- python_version : ${{ env.python_version }}
172- run : $UVX_COMMAND nox -s typecheck-"$python_version"
193+ python_version : ${{ steps.python_version.outputs.python_version }}
194+ session : ${{ matrix.session }}
195+ run : $NOX_COMMAND -s "${session}-${python_version}"
173196 shell : bash
174197
175198 test :
@@ -188,10 +211,13 @@ jobs:
188211 ${{
189212 fromJson(needs.build-package.outputs.minmax-default-python-versions)
190213 }}
214+ session :
215+ - test
191216 include :
192217 - os : windows-latest
193218 python-version :
194219 ${{ needs.build-package.outputs.default-python-version }}
220+ session : test
195221 steps :
196222 - uses : actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
197223 with :
@@ -208,14 +234,19 @@ jobs:
208234 - name : Test with nox
209235 env :
210236 python_version : ${{ matrix.python-version }}
211- run : >-
212- $UVX_COMMAND nox -s test-"$python_version" -- ++installpkg dist/*.whl
213- shell : bash
237+ options : " ++installpkg dist/*.whl"
238+ session : ${{ matrix.session }}
239+ run : |
240+ # shellcheck disable=SC2086
241+ $NOX_COMMAND -s "${session}-${python_version}" -- $options
242+ shell : bash -euxo pipefail {0}
214243
215244 - name : Upload coverage data
216245 uses : actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # v7.0.0
217246 with :
218- name : coverage-data-${{ matrix.os }}-${{ matrix.python-version }}
247+ name :
248+ coverage-data-${{ matrix.os }}-${{ matrix.python-version }}-${{
249+ matrix.session }}
219250 path : .nox/test-*/tmp/.coverage*
220251 include-hidden-files : true
221252 if-no-files-found : ignore
@@ -247,12 +278,12 @@ jobs:
247278 cache-dependency-path : requirements/lock/uvx-tools.txt
248279 - name : Run coverage
249280 run : |
250- $UVX_COMMAND nox -s coverage -- ++coverage combine html markdown
281+ $NOX_COMMAND -s coverage -- ++coverage combine html markdown
251282 cat coverage.md
252283 cat coverage.md >> "$GITHUB_STEP_SUMMARY"
253284
254285 # fail if under 100%
255- $UVX_COMMAND nox -s coverage -- ++coverage report ++coverage-options --fail-under=100
286+ $NOX_COMMAND -s coverage -- ++coverage report ++coverage-options --fail-under=100
256287 shell : bash
257288 - name : Upload HTML report if check failed.
258289 uses : actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # v7.0.0
0 commit comments