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

Allow changing of working dir, or respect defaults.run.working-directory #22

Open
GregJohnStewart opened this issue Dec 20, 2023 · 3 comments

Comments

@GregJohnStewart
Copy link

Hello,

This seems to work, however, it does not respect the defaults.run.working-directory value set, and there is no way to specify the directory this should be run in. It only works for tests at the root level of the project, it seems.

It would be great to have both;

  • This action supports the defaults.run.working-directory value
  • Provide an option to run in a given directory
@uriafranko
Copy link

Hey @GregJohnStewart
Adding custom-pytest: 'cd app && poetry run pytest run_tests.py ' helped me fix this issue

@YuriiSSmolii
Copy link

Same issue, I have to specify the path to the folder with specific tests, but there is no such option..

@ostov
Copy link

ostov commented May 24, 2024

      - name: 'Test: Run'
        uses: pavelzw/pytest-action@v2
        with:
          verbose: true
          emoji: true
          job-summary: true
          custom-pytest: 'cd webhook-billing-record && python3 -m pytest'
          custom-arguments: 'tests/*'
          click-to-expand: true
          report-title: 'Test Report'

But I agree that this ^^^ is not obvious at first sight and option to run in a given directory would be grate!

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

4 participants