Created
August 27, 2017 23:53
-
-
Save iamferreirajp/951f441baff4feb3837d22eab33f9e02 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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