-
Notifications
You must be signed in to change notification settings - Fork 140
ci: update PDM to v2.20.1, cache lockfile between runs #1278
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
Merged
Conversation
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
it really only helps with jobs that use the same os + python version as the initial lock-dependencies job, since (1) the pdm cache isn't really os-agnostic, and (2) [cache versions](https://github.com/actions/cache#cache-version) between os'es aren't the same as the pdm cache path changes
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
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.
Summary
This
finallyupdates the PDM version used in CI from v2.4.6 to v2.20.1, and starts caching the lockfile between CI runs.The newer PDM version is a tiny bit faster, and allows us to remove some of the workarounds that had to be added over time. It's worth noting that v2.20.1 is still not quite the latest version, which would be v2.22.2 at the time of writing, but it is the last version to support Python 3.8.
Caching
pdm.lock
speeds up full CI runs by about ~90 seconds on subsequent runs, with the added benefit of no longer having each sub-job lock dependencies on its own, instead locking dependencies once for all jobs in a separate initial job, if not already cached.Adding the lockfile to the repo directly would be fine for applications, but is not necessarily ideal from a library standpoint, as we want to at least try to mimic user-site installation, which always pulls the latest (compatible) versions of dependencies.
Checklist
pdm lint
pdm pyright