-
Notifications
You must be signed in to change notification settings - Fork 64
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add workingDirectory input #220
Conversation
Hi @paambaati, any chance you can have a look at this? Thanks! |
Hi @vladjerca, @mattvv & @MartinNuc, can any of you take a look at this? Thanks! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me 👍
@arareko Nice addition, but it's on @paambaati to get this merged, don't know who else has merge rights on the repo 😋 |
@vladjerca thanks for the comment! hopefully @paambaati gets to see this then.. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 👍
I'm so sorry folks, I'd been busy with work. I'm looking at this PR right now and you can expect it to be merged in the next few hours. |
@arareko Thanks a lot for this PR! I'll be following this up with tests. |
@paambaati I just saw you added the tests and released this feature along with a new version. Thanks so much. Cheers! |
When checking out multiple repos within a single GitHub workflow, the use of
path
becomes necessary to keep things organized, but also creates the need to move across directories to accomplish certain tasks. In the case of running unit tests for a specific project folder, this usually leaves the resulting files in the directories where the test command was executed.Code Climate's
cc-test-report
binary does not support pre-pending the path to the "location" of the coverage files, and also searches for a.git/
directory in the current working directory. These two conditions make it necessary to run the binary within the proper location.GitHub actions’
uses
step does not allow specifying aworking-directory
in which to run the action being "used". At the same time, theuses
step doesn't seem to execute a shell (thus therun
item does not apply to it), hence thecd
shell builtin is never available. Pre-pendingcd <path> &&
to thecoverageCommand
input results in an error due to this.This patch adds a
workingDirectory
input to this GH action, which allows changing to a custom working directory via Node.js’process.chdir()
function. It also fixes a few places whereerror()
was being passed non-string values, thus giving runtime errors.