2

I am confused about the conceptual relationship/differences and usage scenarios between tox and Travis-CI.

I saw Python projects are testing for different Python environments by using tox OR Travis-CI respectively. So it seems that these two CI services can be the alternative to each other.

But I also read that we can run tox with Travis-CI. And this seems that these two CI services are the complementary to each other.

So I am wondering why do we still need Travis-CI if we already have tox (Or the other way around)? Hope someone can make clarification or point some resources about the conceptual relationship and/or differences and usage scenarios between these two? Thanks in advance!

YaOzI
  • 16,128
  • 9
  • 76
  • 72
  • 1
    There's nothing wrong with this question. I've been coding python actively for a decade and I use travis and tox extensively. I *still* find the overlap confusing and the lack of clear separation of concerns confusing. For example, they both define environments, but have different means of preparing environments with dependencies. And they're both evolving, so today's answer is different from last year's. When downvoting, please have the guts to leave a comment. Otherwise you're just taking pot shots at strangers. – Reece Feb 29 '20 at 19:39

1 Answers1

3

tox and Travis CI are two completely different and independent things.

tox is a program to run tests. For every test run it creates a separate virtual environment. tox is not a service, it's a program. You can run tox locally as it doesn't use any external resources. But you can also run tox at Travis CI.

Travis CI is a commercial service (with a free tier) to run tests at their virtual machines with Linux, MacOS and Windows operating systems.

You can run tox locally without Travis, you can run tests at Travis CI without tox, you can run tests with tox at Travis CI.

PS. You can even run tests without tox and without Travis but that's the least interesting part. ;-)

phd
  • 82,685
  • 13
  • 120
  • 165