snok / install-poetry

Github action for installing and configuring Poetry
MIT License
587 stars 53 forks source link

Instruct to use the Python version as part of the venv cache key #66

Closed ruohola closed 2 years ago

ruohola commented 2 years ago

Virtual environments are heavily Python version specific, and it doesn't really make sense to share the cache between different Python versions.

sonarcloud[bot] commented 2 years ago

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
No Duplication information No Duplication information

ruohola commented 2 years ago

I think the one example with a matrix is made simpler by using matrix.python-version, but otherwise I agree this seems like an improvement, particularly for the example workflows that people might just copy paste.

But the matrix version is most usually just in the major.minor format, the outputs.python-version has the exact version number. I'm not sure if venvs are 100% compatible between Python's patch versions. I would assume they aren't.

sondrelg commented 2 years ago

I'm not sure, but re-building venvs on new patch versions seems like it might be a pretty sane default. I'm convinced 👍

sondrelg commented 2 years ago

Thanks @ruohola!