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

Improve --notest documentation #829

Closed
2 tasks done
webknjaz opened this issue May 25, 2018 · 6 comments
Closed
2 tasks done

Improve --notest documentation #829

webknjaz opened this issue May 25, 2018 · 6 comments

Comments

@webknjaz
Copy link
Contributor

webknjaz commented May 25, 2018

  • a clear problem statement with an example

When running tox in CI there's often job step separation and failures in different kinds of stages are accounted differently. For example, in Travis CI its error/failure depending on whether the command is failing in install of script step.

  • suggested change with example

I'd like to see smth like --skip-command flag or smth like it for pre-populating env (installing deps), which I'd run in the install stage, and then I'd run normal tests, for which tox would reuse env created earlier.
This would help separate different logical steps of doing automatic testing in CI.

@obestwalter
Copy link
Member

obestwalter commented May 25, 2018

He @webknjaz, thanks for the suggestion. If I understand you correctly you are looking for the sadly underdocumented --notest flag, which skips running the commands?

@webknjaz
Copy link
Contributor Author

oh.. looks like it. I'll tell more once get to testing it. thanks :)

@gaborbernat
Copy link
Member

I myself don't entirely understand the use case. Let us know what you have a full example of what you're trying to achieve.

@webknjaz
Copy link
Contributor Author

.travis.yml:

install: tox --notest  # installs deps
script: tox  # runs tests

This is what I wanted and the suggestion works for me

@gaborbernat
Copy link
Member

How would this manifest differently on Travis as opposed to not having the install phase? Is it purely for caching purposes?

@webknjaz
Copy link
Contributor Author

It's (1) separate in log and (2) produces different type of build error on install step, than script step failures do. And also (3) sometimes there's spaghetti-like machinery script running tests and it's just less messy when done separately in other explicit step.

@rpkilby rpkilby changed the title Support installing deps without running test commands Improve --notest documentation May 26, 2018
@gaborbernat gaborbernat added this to the 3.5 milestone Sep 18, 2018
@helpr helpr bot added the pr-available label Oct 5, 2018
@helpr helpr bot added pr-merged and removed pr-available labels Oct 5, 2018
@tox-dev tox-dev locked and limited conversation to collaborators Jan 14, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants