Skip to content

Refactor the test CI: use tox, pytest and tango-cs-docker

Carlos Pascual requested to merge pytest into develop

This PR proposes a complete refactoring of our CI in travis.

Improvements:

  1. Based in tox + tox-conda (tests can be reproduced locally in a similar way as they are executed by travis).
  2. The tango support in travis is provided by tango-cs-docker running as an independent service. We do not use or need the taurus-test images now.
  3. Facilitates adding new tests and test environments: this PR already adds tests for various interesting combinations of versions of python (2.7, 3.5, 3.6, 3.7), and of Qt bindings (PyQt4, PyQt5 and Pyside2), as well as flake8 tests and doc builds.
  4. Tests are run with PyTest instead of unittest (the tests are not changed for now, just run with PyTest even if they are implemented with unittest). In practice, we see that the travis builds seem more robust now(maybe #851 (closed) is fixed by this?). It also opens the door to using many interesting features of PyTest (fixtures, parameterizations, pytest-qt,...)
  5. We can use tox to deploy local environments for test and development:
    tox --devenv -e py37-qt5 taurusenv
  6. A flake8 test is implemented, but for now it is allowed to fail (I intend to submit another PR fixing all flake8 issues in taurus)

Notes for integrators:

Merge request reports