ci: cache uv binary in tool-cache to skip GitHub Releases download#30
Closed
ci: cache uv binary in tool-cache to skip GitHub Releases download#30
Conversation
- Rename test job to test-native and update label to clarify Odoo-only - Reorder bootstrap steps: git config and curl before config.toml write - Change --no-newcomer to --yes on all tlc commands for non-interactive CI - Add test-oca job that runs after test-native to test with OCA modules - Configure test-oca with uv binary cache (same key as test-native) - Pin uv version to 0.10.8 in test-oca with ignore-empty-workdir: true - Exclude master branch from test-oca (no all_repos_master.toml available) - Set continue-on-error on pull-repos in test-oca for missing branch failures
Contributor
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Before
setup-uvwithenable-cache: truewas already added in #17, caching the uv package cache (~/.cache/uv). However, theuvbinary itself was still downloaded from GitHub Releases on every matrix job run, producing this noise in logs:This happens because
setup-uvruns before checkout — nopyproject.tomlexists yet, so it can't resolve the version locally and falls back to a GitHub Releases download every time.After
An explicit
actions/cachestep now caches/opt/hostedtoolcache/uv.setup-uvchecks this directory first; if the binary is present, it skips the GitHub Releases download and the log noise above disappears on warm runs.Also incorporates the e2e job split from #18:
test→test-native+ newtest-ocajob that runs with OCA modules aftertest-nativesucceeds.Rationale
enable-cache: true— caches the uv package cache (pip-equivalent downloads), not the binaryignore-empty-workdir: true— suppresses the "could not finduv.toml/pyproject.toml" warnings; the repo isn't checked out yet at this stepuv-binary-${{ runner.os }}-0.10.8is static (no branch component) so all PRs read the cache warmed bymaintest-nativeandtest-oca— native job warms it, OCA job reusesSupersedes #18
This PR absorbs all changes and adds uv binary caching to both jobs.
pytestdev dependency not included (out of scope for this PR, added in fix(cli): --preset ignored when --project-dir precedes it; --extra-requirement overrides preset #27)