Allow Setting Tool Path Directory#937
Conversation
also add a .node-version file
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## develop #937 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 7 7
Lines 811 811
Branches 293 293
=========================================
Hits 811 811 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
I would prefer to keep Also, please edit read_env function in unix.sh to export the tools_dir env. |
|
I've changed this to now read from an environment variable in the Test run of this change can be seen here: https://github.com/Sn0wCrack/setup-php-multi-runner-users-reproduction/actions/runs/14302395645/job/40078991570 |
|
@Sn0wCrack Looks like the env name |
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