Skip to content

Instantly share code, notes, and snippets.

@iamferreirajp
Created August 27, 2017 23:53
Show Gist options
  • Save iamferreirajp/951f441baff4feb3837d22eab33f9e02 to your computer and use it in GitHub Desktop.
Save iamferreirajp/951f441baff4feb3837d22eab33f9e02 to your computer and use it in GitHub Desktop.
# Python CircleCI 2.0 configuration file
#
# Check https://circleci.com/docs/2.0/language-python/ for more details
#
version: 2
jobs:
build:
docker:
# specify the version you desire here
# use `-browsers` prefix for selenium tests, e.g. `3.6.1-browsers`
- image: circleci/python:3.6.1
# Specify service dependencies here if necessary
# CircleCI maintains a library of pre-built images
# documented at https://circleci.com/docs/2.0/circleci-images/
# - image: circleci/postgres:9.4
working_directory: ~/repo
steps:
- checkout
- run:
name: install dependencies
command: |
sudo apt-get install python-pip
sudo pip install django flake8
- run:
name: migrate
command: |
python manage.py migrate
- run:
name: run tests
command: |
python manage.py test
flake8 --exclude polls/migrations/,manage.py .
- store_artifacts:
path: test-reports
destination: test-reports
- run: bash .circleci/setup-heroku.sh
- add_ssh_keys:
fingerprints:
- "AAAAB3NzaC1yc2EAAAADAQABAAABAQCthqZpqAbVghDWpER6wOhgsQDSm"
- deploy:
name: Deploy Master to Heroku
command: |
if [ "${CIRCLE_BRANCH}" == "master" ]; then
git push heroku master -f
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment