Skip to content

ci: pin setup-python to 3.x for pre-commit - #879

Draft
nieblara wants to merge 1 commit into
mainfrom
cursor/ci-setup-python-3x-fb43
Draft

nieblara wants to merge 1 commit into
mainfrom
cursor/ci-setup-python-3x-fb43

Conversation

@nieblara

Copy link
Copy Markdown
Contributor

Requirements

  • I have added test coverage for new or changed functionality
  • I have followed the repository's pull request submission guidelines
  • I have validated my changes against all supported platform versions

Related issues

Follow-up to #864, which updated actions/setup-python from v3 to v7.

Describe the solution you've provided

Since v4, actions/setup-python with no inputs does not install Python. Thus pre-commit uses the Python on the runner PATH (3.12), not the newest 3.x. Also, the pre-commit/action cache key loses its Python version segment. This change adds python-version: '3.x' to the step in .github/workflows/go.yml to keep the old behavior and cache key.

Describe alternatives you've considered

Pin one exact Python version. This change does not do that, because v3 used the newest 3.x.

Additional context

This change touches only the setup-python step.

Open in Web Open in Cursor 

Co-authored-by: rniebla <rniebla@launchdarkly.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants