-
Notifications
You must be signed in to change notification settings - Fork 34
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
Single cross-version travis envlist #19
Comments
IMO this issue should be titled "Single cross-version travis envlist" or similar, as the single envlist is what I was thinking might be valuable. I'm appreciating that this could be a mis-feature. There is not much benefit at present for using tox-travis with a single As I mentioned in the original comment, this mode is already possible by
Aliasing However it would re-run the envs if multiple jobs invoke tox with tox-travis in effect (no -e or TOXENV). How much of a problem is that? The user should notice that this has occurred, and rectify their build config. We could add a warning or error by checking that I cant think of another approach which could accurately warn the user without very accurate parsing of |
OK, that's a more reasonable thought, then, if it only attempts to work with a single job. Let me share another thought with you, and see if it affects your thought on the design of it. Currently the keys in What I like the idea of most ATM for specifying per-version dependencies is this: [tox:travis]
python =
2.7: py27
pypy: pypy
nightly: py36 Given that idea, perhaps the single-runner version would just be: [tox:travis]
python = py{27,34,py,py3} Which would necessarily be telling tox-travis that only one Python should be running. It also leaves the possibility for |
Yea, I've been thinking about #4 ; not sure I have a good answer for that one yet, but I've got some ideas floating around. What is interesting for this issue is the problem of supporting python on linux and osx and eventually win (travis-ci/travis-ci#2104), if we were using a single cross-version travis envlist, as that would require multiple jobs , which would break the TRAVIS_JOB_NUMBER check. Here is a osx travis job that has multiple python interpreters available to tox The benefit of a single job is even greater for osx, as they are much slower starting up. This can be easily supported in When TRAVIS_JOB_NUMBER shows that the build has multiple jobs, rather than parsing e.g. https://api.travis-ci.org/builds/140967962 includes the config for each job, with an 'os' key for each job. We could assert that there is only one job per os. Here is the JSON for two individual jobs, which makes it easier to see what the API provides for each job: Then we run into the very likely problem that a multi-os |
You've convinced me that attempting to warn using Still, we'd like to support a simple case where a single job can run all the desired tox envs. First, though, I think we've got to have some idea where we want to go with the other factors. There are 4 factors that I think would be helpful to support in I have a pattern of how I'd like to support these that I think will be quite nice, and make a simple paradigm. First, I'd like to see the keys in the The one exception to those rules is that the python versions should be an exception to that third rule, and the default should be to only match envs that are associated with that python version identifier ( Also, I note that I have no way to tell the difference between the version being absent and the version being defaulted (to All in all, a cross-platform configuration might look something like this in the [tox:travis]
python_all_envs = True
language =
python: py{27,32,33,34,py}-{spam,eggs}
os =
osx: py{27,34}-{spam} It seems a bit line noisy when you're just overriding one thing each, but I don't see any reason to not enable overriding for the non-default os and language if desired. The |
Alternative for the default-affecting flag: |
It occurs to me that it would still be possible to use the python =
py{27,34}, docs # Only these will run for _any_ Python version
3.5: docs # Run the docs on py35.
3.3: spam # Won't be run, because it's not in the list for any Python version
# 2.7 and 3.4 are defaulted, automatically, to py27 and py34
# autoenv = False could be added to make it run all the versions This would make sense if you think about it like tox's deps, which may be universal or conditional based on the presence of a prefix. |
@jayvdb: Do you still see enough benefit to this for it to be worth doing? |
I'm open to re-evaluating if anyone comes up with a need for it, but I think the common cases are pretty much handled with the variants that we look at. Feel free to make your case for re-opening if you disagree. |
With the discussion on #97, I'm re-opening this issue to add the |
Also, it should default to the Travis |
From @jayvdb on #16:
The suggestion that he brings up is to have a key in the
[tox:travis]
section to declare the envs thattox-travis
should run:And then use that to populate the list of environments if no Travis python version build matrix is specified. That makes some sense but:
.travis.yml
file, which I currently avoid. I don't want to duplicate their parsing logic..travis.yml
, but not enough to cover the envs listed in thetox-travis
envlist. Should it try to assign them? Warn? Related to Runtime check for tox envs that won't run #18 .So far I'm not sure if an attempt at this would be a feature or a misfeature. If someone wants to come up with a design of the work that would need to be done, I wouldn't stand in the way, but I'd encourage thinking through the design well before writing the code. I think there are some challenges that need to be addressed first, and discussed to make sure that we can live with the consequences of the complexity they will add.
The text was updated successfully, but these errors were encountered: