Skip to content

Instantly share code, notes, and snippets.

@matiasherranz
Last active September 20, 2016 14:12
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save matiasherranz/ed39b54d98339eb6982cca8c2a385ed5 to your computer and use it in GitHub Desktop.
Save matiasherranz/ed39b54d98339eb6982cca8c2a385ed5 to your computer and use it in GitHub Desktop.
# Let's move to the proper GIT branch
git checkout $BRANCH
git pull origin $BRANCH
# Activate the virtualenv of this job
. venv/bin/activate
# Install project requirements
pip install -Ur requirements.txt
# Now move to the Django project folder
cd pyjenkins_demo/
# Run project unittests
python manage.py test
# Run the tests and collect coverage data of the
# executed files in the project.
# (yes, this is redundant, but it makes for the example)
coverage run --source='.' manage.py test
coverage html
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment