path: attribute is not relative to working-directory:
dominickendrick opened this issue · comments
Hi,
Thanks for making this GitHub Action, it's very useful!
One thing I can across was that if you use the working-directory
attribute in your action, the path
attribute needs to also include the full path.
ios-reference-app-bundled-tests:
name: Run Cover Drop reference bundled tests
runs-on: macos-latest
steps:
- name: Checkout sources
uses: actions/checkout@v3
- name: UI Tests
working-directory: ios/reference/ <<< When this is set ...
run: >
xcodebuild clean test
-project reference.xcodeproj
-scheme reference
-resultBundlePath TestResults
-destination 'platform=iOS Simulator,name=iPhone 14'
- uses: kishikawakatsumi/xcresulttool@v1
with:
path: ios/reference/TestResults.xcresult <<< Path needed to be updated
show-passed-tests: false
if: success() || failure()
It would be good if the path
attribute looked for files relative to the working-directory
.
@dominickendrick As far as I know, working-directory
is only valid within that step, it does not carry over to the next step. It seems that the xcresulttool step could also specify a working-directory
, but working-directory
cannot be used at the same time as uses
. A workaround would be for this action to support a working-directory parameter itself, like the setup-ruby action.
https://github.com/ruby/setup-ruby/blob/master/action.yml#L27
Is this likely to satisfy the requirement?
Thanks for the information, I didn't realise that working-directory
is only valid within it's declared step.
If the action to support a working-directory parameter itself, that could be useful.
I don't want to clutter your action for something that may not be used much. But if you're happy to make that addition, then go for it.
Thanks