The project is currently using a mix of the GitHub supplied setup-python action and pantsbuild/actions/expose-pythons. On GitHub managed runners they behave similarly:
setup-python will install a version of Python if missing, or add it to the PATH if already present at the expected location (managed runners historically have multiple Pythons baked into the image)
expose-pythons will add all Python's at the expected GitHub location to the PATH. (Which ones is up to GitHub.)
So today the invocation of setup-python followed by expose-pythons is redundant.
Consolidating on setup-python let's us be explicit about expected versions (more like the ARM image) and reduces the number of custom actions the project manages while still making multiple Python versions available.
The project is currently using a mix of the GitHub supplied
setup-python
action andpantsbuild/actions/expose-pythons
. On GitHub managed runners they behave similarly:setup-python
will install a version of Python if missing, or add it to the PATH if already present at the expected location (managed runners historically have multiple Pythons baked into the image)expose-pythons
will add all Python's at the expected GitHub location to the PATH. (Which ones is up to GitHub.)So today the invocation of
setup-python
followed byexpose-pythons
is redundant.Consolidating on
setup-python
let's us be explicit about expected versions (more like the ARM image) and reduces the number of custom actions the project manages while still making multiple Python versions available.NOTE: The awkward double newlines in the final yaml are a pre-existing issue https://stackoverflow.com/questions/45004464/yaml-dump-adding-unwanted-newlines-in-multiline-strings
See #21552 for some history regarding the
setup-
vsexpose-
actions.