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

Use docker for testing #631

Closed
wants to merge 6 commits into from
Closed

Use docker for testing #631

wants to merge 6 commits into from

Conversation

carltongibson
Copy link
Owner

Having played with Travis for Python 3.6 support, and not wanting to duplicate the tox config if possible, I thought to try using a preconfigured image with docker.

Not sure whether to merge this. A little slow-down would OK — I really don't want to duplicate the build matrix — that is a pain — but it would be nice to do better that 2x

  • Re-add coverage
  • Investigate caching first image fetch (≈50secs.)
  • Why no time difference between tox build and detox build? (cp 1065 vs 1066 — diff of 2s)
  • Why slower than before (even allowing for image fetch)? Build 1024 2m10s vs Build 1066 5m34s? — so if we could cache the image fetch we're looking at 2mins vs 4...

@carltongibson
Copy link
Owner Author

There is at least one extra env here (py36-djangolatest-restframeworklatest) so that's a few seconds.

@carltongibson
Copy link
Owner Author

Main issue is pip caching. Should be able to resolve that with a mount.

… attempt to prime pip cache.
@carltongibson
Copy link
Owner Author

It looks like this will remain slower (at least for now): 3f6fb0b tries installing the requirements at the docker build step. This make ≈0 difference to the build time (maybe a couple of seconds). The subsequent docker run step is not affected (it still takes ages™)

Cf Build 1073 and Build 1066

I'm guessing the bottom line is that Docker (or the host VM) is underpowered — particularly with regard to parallelisation — compared to the travis' own containers. (Just guessing.)

Also there's a spurious error on the warnings build:

  File "/src/.tox/warnings/lib/python3.6/site-packages/django/db/backends/utils.py", line 187
    match = re.match('([^"]+)"\."([^"]+)', name)
                        ^
SyntaxError: invalid escape sequence \.

I'll keep playing with this but it's not going to go in just yet.

@carltongibson
Copy link
Owner Author

@rpkilby I see you contributed to tox-travis — does that package solve the duplication issue? (It looks like it should.)

@carltongibson
Copy link
Owner Author

It turns out that "Yes" is the answer there. #651

@carltongibson carltongibson deleted the bugfix/use-docker branch March 2, 2017 13:06
@rpkilby
Copy link
Collaborator

rpkilby commented Mar 2, 2017

Yep - I started to submit a PR, but was hesitant since I was duplicating the build matrix in both tox and travis. That would be similar to DRF's tox config right now. I hand't thought to use tox-travis to just run all of the python version specific builds.

@carltongibson
Copy link
Owner Author

For me the prime concern is keeping the matrix in one place. tox-travis does that. So (currently) it's favourite. 🙂

@rpkilby
Copy link
Collaborator

rpkilby commented Mar 2, 2017

Yeah - the duplication isn't as bad, but it's still annoying to figure out what to correctly include/exclude in the travis matrix. Your approach is a good compromise

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants