Skip to content

Allow Setting Tool Path Directory#936

Closed
Sn0wCrack wants to merge 5 commits into
shivammathur:developfrom
Sn0wCrack:feature/override-tool-path-directory
Closed

Allow Setting Tool Path Directory#936
Sn0wCrack wants to merge 5 commits into
shivammathur:developfrom
Sn0wCrack:feature/override-tool-path-directory

Conversation

@Sn0wCrack
Copy link
Copy Markdown
Contributor

@Sn0wCrack Sn0wCrack commented Apr 6, 2025


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_dir value 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-version file to match the Node version in the action.yml file.

I was unclear on how to write tests for this particular feature, as I can't see any for the fail-fast option 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 format before the commit.

  • I have run npm run lint before the commit.

  • I have run npm run release before the commit.

  • npm test returns 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

@Sn0wCrack Sn0wCrack changed the base branch from main to develop April 6, 2025 23:53
@Sn0wCrack
Copy link
Copy Markdown
Contributor Author

I've realized from the note in the PR that develop is meant to tbe the main target and my fork is just default branches, so I'll need to re-create this.

@Sn0wCrack Sn0wCrack closed this Apr 7, 2025
@Sn0wCrack
Copy link
Copy Markdown
Contributor Author

Recreated this over at: #937

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant