Allow Setting Tool Path Directory #937
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.
name: Allow Setting Tool Path Directory
about: Allow providing a custom path for PHP tools to be downloaded and managed from
labels: enhancement
A Pull Request should be associated with a Discussion.
Related discussion: #876
Description
In this PR, I allow passing through the
tools_path_dirvalue into the scripts.My main motivation for this is self-hosted runners. A big issue I've been running into is the composer binary download lock file never being cleared or the composer binary being overwritten while it is in use by another user.
My real main use case for this is setting the tools directory to
$HOME/.local/bin, to allow the binary to be installed per-user, rather than globally to the system and overwritten every time by each runner user.Additionally I added a
.node-versionfile to match the Node version in theaction.ymlfile.I was unclear on how to write tests for this particular feature, as I can't see any for the
fail-fastoption which basically does the same thing here.If they need to be written for this case, then please let me know how they might actually need to be implemented or some example test cases that are similar I can base it off.
I have written test cases for the changes in this pull request
I have run
npm run formatbefore the commit.I have run
npm run lintbefore the commit.I have run
npm run releasebefore the commit.npm testreturns with no unit test errors and all code covered.I have checked the edited scripts for syntax.
I have tested the changes in an integration test (If yes, provide workflow YAML and link).
Test Workflow and Repository: https://github.com/Sn0wCrack/setup-php-multi-runner-users-reproduction/blob/main/.github/workflows/deployment.yml