Skip to content

Add working-directory support - #5

Open
0x2b3bfa0 wants to merge 2 commits into
scruplelesswizard:mainfrom
0x2b3bfa0:patch-1
Open

Add working-directory support#5
0x2b3bfa0 wants to merge 2 commits into
scruplelesswizard:mainfrom
0x2b3bfa0:patch-1

Conversation

@0x2b3bfa0

Copy link
Copy Markdown

This pull request adds working-directory support, very useful for monorepo setups where paths have to be relative to a subdirectory.

@scruplelesswizard

Copy link
Copy Markdown
Owner

Closing and reopening to trigger CI. Sorry for the noise!

@scruplelesswizard scruplelesswizard left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Useful feature for monorepo setups, but there are two bugs in the current diff that mean it doesn't actually work yet:

  1. The guard checks ${{ inputs.working.directory }} (dot) instead of ${{ inputs.working-directory }} (hyphen, matching the input's actual name). inputs.working.directory doesn't resolve to anything, so this condition is always false and the cd never runs — the feature is currently dead code.
  2. Even with #1 fixed, split_tests is downloaded via curl into the job's original working directory in the install step. If this step cds into a subdirectory first, ./split_tests on the next line won't resolve — the binary isn't there. You'd need an absolute path to the installed binary (e.g. capture $GITHUB_WORKSPACE/wherever it's installed before the cd, or invoke it via an absolute path) for this to work from a non-default working directory.

Fix the input reference and the binary path and this should be good to merge — happy to take another look once updated.

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.

2 participants