actions / actions/setup-python
Allow specifying a minimum version
Chưa có ai nhận issue này.
- Ngôn ngữ chính
- TypeScript
- Star
- 2.2k
- Fork
- 739
- Merge trung bình
- 6 ngày 18 giờ
- Pull request đã merge (30 ngày)
- 1
Mô tả
Description:
I've written a utility script in Python for some of our internal reusable workflows, and it depends on some features added in 3.13. Currently on ubuntu-latest 3.12 is the default version, but 3.13 is available in the tool cache. This means that I can add a setup-python step in my composite action that will activate 3.13. However at some point in the future, 3.13 will become the default, then 3.14, and etc etc. When 3.14 is the default, I'm fine using 3.14 for my script. However my action will continue to be pinned to 3.13, downgrading the version of Python.
It would be nice to specify a minimum version (in my case 3.13). If the default version is less than the minimum version, it would do as it does now and activate (or download if it's not in the tool cache) version 3.13. If the default version is 3.13 or greater, it would simply not do anything.
Justification:
Python is useful for writing small glue scripts in workflows where the full capabilities of python version management aren't required, but it would be nice to be able to automatically use this action to ensure a minimum version is present on the runner, to enable these glue scripts to run easily without a lot of effort on the person building the workflow.
Are you willing to submit a PR?
Given some guidance on the flow of the existing code, I could potentially be able to work on adding this functionality myself.
Hướng dẫn đóng góp
Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Hướng nghiên cứu
Bắt đầu bằng cách theo dõi bước setup-python và tương tác của bước này với bộ nhớ đệm công cụ của runner, tập trung vào cách phiên bản Python mặc định được chọn. Được xem là hoàn tất khi có thể yêu cầu một phiên bản tối thiểu, các phiên bản mặc định cũ hơn kích hoạt hoặc tải xuống phiên bản đó, còn các phiên bản mặc định mới hơn được giữ nguyên; hãy bổ sung coverage cho cả hai trường hợp nếu luồng kiểm thử hiện có hỗ trợ.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Đánh giá
- Công nghệ
- github-actions, python, typescript
- Lĩnh vực
- ci-cd, devops, tooling
- Loại issue
- Tính năng
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức độ hoạt động
- Đình trệ
- Độ rõ ràng
- Khá rõ ràng
- Mức phù hợp với người mới
- 38/100