Continuous Integration

    Note

    For advice on writing your tests, see Testing Your Code.

    Martin Fowler, who first wrote about (short: CI) together with Kent Beck, describes CI as follows:

    Buildbot is a Python system toautomate the compile/test cycle to validate code changes.

    is an automation tool providingpackaging, testing, and deployment of Python software right from the console orCI server. It is a generic virtualenv management and test command line toolwhich provides the following features:

    • Running tests in each of the environments, configuring your test tool ofchoice
    • Acting as a front-end to Continuous Integration servers, reducing boilerplateand merging CI and shell-based testing

    Travis-CI is a distributed CI server which buildstests for open source projects for free. It provides multiple workers to runPython tests on and seamlessly integrates with GitHub. You can even have itcomment on your Pull Requests whether this particular changeset breaks thebuild or not. So if you are hosting your code on GitHub, Travis-CI is a greatand easy way to get started with Continuous Integration.

    This will get your project tested on all the listed Python versions byrunning the given script, and will only build the master branch. There are alot more options you can enable, like notifications, before and after steps,and much more. The explain all of these options, and are very thorough.

    In order to activate testing for your project, go to the Travis-CI siteand login with your GitHub account. Then activate your project in yourprofile settings and you’re ready to go. From now on, your project’s testswill be run on every push to GitHub.

    原文: