Skip to content
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

path: attribute is not relative to working-directory: #602

Open
dominickendrick opened this issue Jan 20, 2023 · 2 comments
Open

path: attribute is not relative to working-directory: #602

dominickendrick opened this issue Jan 20, 2023 · 2 comments

Comments

@dominickendrick
Copy link

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.

@kishikawakatsumi
Copy link
Owner

@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?

@dominickendrick
Copy link
Author

Hi @kishikawakatsumi

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

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

No branches or pull requests

2 participants