Repository navigation
Install uv with mise in CI #540
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
0e7cde3
b131d04
06b6339
d3ea2d2
f663f2f
e5770d5
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -22,14 +22,14 @@ jobs: | |
| with: | ||
| submodules: true | ||
| persist-credentials: false | ||
| - name: Install the latest version of uv | ||
| uses: astral-sh/setup-uv@07a047e608db84b3d8c06cd9a7c7dcc9c355c18e # v10.3.2 | ||
| - name: Install tox | ||
| run: uv tool install --python-preference only-managed --python 3.13 tox --with tox-uv --with tox-gh | ||
| - name: Install uv with mise | ||
| uses: jdx/mise-action@82a612c5ab8bcda7cc5db6b7e81a8e7584c3dc6e # v5.2.3 | ||
|
coderabbitai[bot] marked this conversation as resolved.
Resolved
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The test jobs no longer cache uv's package downloads. Each of the 20 matrix jobs downloads all wheels from PyPI again. mise-action caches only the mise directory, which holds about 20 MB of uv binary. setup-uv cached the uv cache directory by default, keyed on uv.lock. With mise-action, every OS and Python job downloads the same pinned dependencies again. This makes CI slower and adds PyPI traffic for no gain. Fix: add an 🤖 Comment by Claude Opus 5.5.
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Seems fine
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Removing setup-uv also removes its Python problem matcher. setup-uv v10.3.2 has A pytest failure or traceback in the test jobs no longer shows as an annotation on the PR's changed lines or in the run summary. Reviewers must open the raw log to find the file and line that failed. 🤖 Comment by Claude Opus 5.5.
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. From Claude (Claude Opus 5.5), on Greg's behalf: Not adding a problem matcher. setup-uv's
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Removing setup-uv also drops its Windows directory defaults. On Windows, setup-uv v10.3.2 sets UV_TOOL_DIR, UV_TOOL_BIN_DIR and UV_PYTHON_INSTALL_DIR (and UV_CACHE_DIR when it caches) to directories under RUNNER_TEMP, which is on the D: drive. Now the windows-latest jobs write the uv cache, tool environments and Python installs under the user profile on the C: drive, which is usually slower on GitHub-hosted Windows runners. The UV_TOOL_BIN_DIR default is also why setup-uv put tox on PATH on Windows and mise-action does not. 🤖 Comment by Claude Opus 5.5.
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. From Claude (Claude Opus 5.5), on Greg's behalf: Not setting these directories. The Windows jobs on this PR are not slower than on |
||
| with: | ||
| install_args: uv | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This comment is about the uv install instructions in A developer who follows CLAUDE.md gets the newest uv in 🤖 Comment by Claude Opus 5.5.
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. From Claude (Claude Opus 5.5), on Greg's behalf: Fixed in e5770d5. |
||
| - name: Install Python | ||
| if: matrix.env != '3.13' | ||
| run: uv python install --python-preference only-managed ${{ matrix.env }} | ||
| - name: Run test suite | ||
| run: tox run --skip-missing-interpreters false | ||
| run: uvx --python-preference only-managed --python 3.13 --with tox-uv-bare --with tox-gh tox run --skip-missing-interpreters false | ||
| env: | ||
| TOX_GH_MAJOR_MINOR: ${{ matrix.env }} | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -368,8 +368,8 @@ Breaking changes when adding required parameters. | |
| ### Setup | ||
|
|
||
| ```bash | ||
| # Install uv if not already installed | ||
| curl -LsSf https://astral.sh/uv/install.sh | sh | ||
| # Install the uv version in mise.lock, which CI also uses | ||
| mise install uv | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
|
|
||
| # Install all dependencies including dev and lint groups | ||
| uv sync --all-groups | ||
|
|
||
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The release build now runs a mise binary that is not pinned. mise-action has no
versionorsha256input, so it downloads the newest mise release that is more than 24 hours old.Each release run can get a different mise binary. That binary runs on the job that builds the sdist and wheel for PyPI. The mise-action pin by commit SHA does not pin mise itself. mise-action does check the download against the mise maintainer's signed checksums, but the version still floats. Fix: set
version:andsha256:on the release step.🤖 Comment by Claude Opus 5.5.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems fine