Move RYE_HOME from workspace home to runner home #194
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Having it "suddenly appear" in the repo root confused some tools like
rye fmt
. We assume that the directory that gets created for the current workflow run is a stable path between workflow runs. If several repositories get checked out or some logic interacts on the workspace level this might lead to unintented behaviour. If this turns out to be a real issue we have to look into using TMPDIR and try to create stable paths there.Several runs of the same repository on the same runner might run with different options. These must not interfere and thus the
.rye
folder must not be left over after the run. The only way to ensure that is to always run thepost
step of the action. Since there is (currently) no way to determine if the workflow succeeded or failed when thepost
step is started (it is possible to run or not run it) we will always save the cache. Since we are only caching.rye
and.venv
there should be no errors because of this.Breaking: The cache will always be saved, even if the workflow failed.
Fixes: #193