Skip to content

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
merged 20 commits into from
Jan 28, 2025

Conversation

shiftinv
Copy link
Member

Summary

This finally updates 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

  • If code changes were made, then they have been tested
    • I have updated the documentation to reflect the changes
    • I have formatted the code properly by running pdm lint
    • I have type-checked the code by running pdm pyright
  • This PR fixes an issue
  • This PR adds something new (e.g. new method or parameters)
  • This PR is a breaking change (e.g. methods or parameters removed/renamed)
  • This PR is not a code change (e.g. documentation, README, ...)

@shiftinv shiftinv added t: enhancement New feature t: meta Changes to the project itself (CI, configs, etc.) labels Jan 27, 2025
@shiftinv shiftinv added this to the disnake v2.11 milestone Jan 27, 2025
@shiftinv shiftinv requested a review from a team as a code owner January 27, 2025 17:38
@shiftinv shiftinv merged commit 56a058e into master Jan 28, 2025
29 checks passed
@shiftinv shiftinv deleted the build/pdm-update branch January 28, 2025 17:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
t: enhancement New feature t: meta Changes to the project itself (CI, configs, etc.)
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

1 participant