From antoninbas:
"You should consider using https://github.com/actions/setup-python. This way you can control which version of python to test with (you can add multiple versions to the test matrix as well). I'm assuming Python-based projects which use Github Actions for testing typically use this core action to set up the environment."