actions / actions/setup-python
Allow specifying a minimum version
Nessuno ha ancora preso questa issue.
- Lingua principale
- TypeScript
- Stelle
- 2.2k
- Fork
- 739
- Merge medio
- 6g 18h
- PR unite (30g)
- 1
Descrizione
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.
Guida per i contributori
Nessuna guida per i contributori indicizzata per questo repository
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Direzione di ricerca
Inizia tracciando il passaggio setup-python e la sua interazione con la cache degli strumenti del runner, concentrandoti su come viene selezionata la versione Python predefinita. Il lavoro sarà completo quando sarà possibile richiedere una versione minima, le versioni predefinite precedenti attiveranno o scaricheranno quella versione e le versioni predefinite più recenti resteranno invariate; aggiungi la copertura per entrambi i casi se il flusso di test esistente lo supporta.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- github-actions, python, typescript
- Ambito
- ci-cd, devops, tooling
- Tipo di issue
- Funzionalità
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Stato di attività
- Ferma
- Chiarezza
- Abbastanza chiara
- Idoneità per principianti
- 38/100