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
webknjaz opened this Issue May 25, 2018 · 6 comments

Comments

Projects
None yet
3 participants
@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

This comment has been minimized.

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

This comment has been minimized.

Copy link
Contributor Author

webknjaz commented May 25, 2018

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

@gaborbernat

This comment has been minimized.

Copy link
Member

gaborbernat commented May 25, 2018

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

This comment has been minimized.

Copy link
Contributor Author

webknjaz commented May 25, 2018

.travis.yml:

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

This is what I wanted and the suggestion works for me

@gaborbernat

This comment has been minimized.

Copy link
Member

gaborbernat commented May 25, 2018

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

@webknjaz

This comment has been minimized.

Copy link
Contributor Author

webknjaz commented May 26, 2018

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.