The great article about Bitrise Pipelines and Tox for Python CI unfortunately does no longer exist. But I found this great article.
Basically you need a simple script like this, called bitbucket-pipelines.yml in your repo.
# This is a sample build configuration for Python.# Check our guides at https://confluence.atlassian.com/x/VYk8Lw for more examples.# Only use spaces to indent your .yml configuration.# -----# You can specify a custom docker image from Docker Hub as your build environment.image:python:3.5.1pipelines:default:-step:script:# Modify the commands below to build your repository.-pip install -U tox-pip --version-tox --version# Actually run tox (build, setup and run tests, as specified in tox.ini)-tox
The rest of the setup is quite straight-forward if you are used to work with tox.
I’ve create a file called tox.ini that makes sure that the requirements are installed and the tests are run with nosetests: