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

Pass in specific pytest command? #107

Open
Freddie-Pike opened this issue May 19, 2021 · 1 comment
Open

Pass in specific pytest command? #107

Freddie-Pike opened this issue May 19, 2021 · 1 comment

Comments

@Freddie-Pike
Copy link

Is it possible to pass in a specifc pytest command? I'm running python in a docker environment so I need to pass in a custom command.

@MishaKav
Copy link

MishaKav commented Jun 2, 2021

Have the same issue. Found solution on similar GitHub Action: Pytest Coverage Comment
The bottom example in readme shows how to use it when you running the pytest inside docker:

- name: Run unit tests (pytest)
  run: |
    docker run -v /tmp:/tmp $IMAGE_TAG python3 -m pytest --cov-report=term-missing:skip-covered --junitxml=/tmp/pytest.xml --cov=src tests/ | tee /tmp/pytest-coverage.txt

- name: Pytest coverage comment
  uses: MishaKav/pytest-coverage-comment@v1.0
  with:
    pytest-coverage-path: /tmp/pytest-coverage.txt
    junitxml-path: /tmp/pytest.xml

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