How to add Travis CI to your github project

Travis CI is a nice way to add Continous Integration / Test / Deplyoment to your github project.

As long as your project is open source aka not private you can use Travis CI for free (with a limited quota of 10000 minutes)


Create an account at 

Connect it with your github account


For enable travis CI in your project you must add a .travis.yml file to the root folder. Mind the dot for hidden file!

The content for a python project can look as follows:

language: python
  - "2.7"
  - "3.8"
  - "3.9"
  - "3.10-dev"

  - python -m unittest discover

Under the python tag you can list all versions under which your code shall be executed. If you don’t provide further information the testing platform is Ubuntu 16.04 Xenial. If you want to run things on Ubuntu 20.04 you can add:

dist: focal

Optional Batch

You can add a batch to your readme

[![Build Status](](

Further Reading