Docs Navigation

Python Continuous Integration

Semaphore makes it easy to setup continuous integration for Python projects. When you add a project from a Python repository, Semaphore will run a brief analysis and suggest some common commands based on the structure of your repository.

For example, after the analysis determines that the project is written in Python and it has a requirements.txt file, the following commands will be suggested:

pip install -r requirements.txt
python setup.py test

You can easily change or add more build commands, customize your build environment with custom configuration files, environment variables and more (see the Customizing your build section for more information).

CI environment for Python projects

The Semaphore platform supports a wide range of Python versions:

  • 2.6.9
  • 2.7.10
  • 3.3.6
  • 3.4.3
  • 3.5.0
  • 3.6.0
  • pypy 5.7.1
  • pypy3 5.7.1

Python environments are managed with virtualenv version 14.0.6. Selecting a Python version in Project Settings activates the corresponding Python environment in your build. Virtual environments are created in the following path: /home/runner/.pyenv/<version>.

Pre-installed packages include pip, mock, pytest, virtualenv, and nose.

Dependency management

Python packages installed with pip are cached between builds on Semaphore. By default, pip packages are downloaded to /home/runner/.pip_download_cache.

Guides

Semaphore Docs are open source — Edit on GitHub

Newsletter

Occasional lightweight product and blog updates. Unsubscribe at any time.

2009-2017 © Rendered Text. All rights reserved. Terms of Service, Privacy policy, Security.