Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # .circleci/config.yml
- version: 2
- jobs:
- test:
- docker:
- - image: circleci/python:3.6.2
- environment:
- PGUSER: root
- PGHOST: 127.0.0.1
- - image: circleci/postgres:9.6.2
- environment:
- POSTGRES_USER: root
- POSTGRES_DB: <same name as in your settings.py default>
- POSTGRES_PASSWORD: ""
- working_directory: ~/repo
- steps:
- - checkout
- - restore_cache:
- keys:
- - v1-dependencies-{{ checksum "requirements.txt" }}
- - v1-dependencies-
- - run:
- name: install dependencies
- command: |
- python3 -m venv venv
- . venv/bin/activate
- pip install -r requirements-dev.txt
- - save_cache:
- paths:
- - ./venv
- key: v1-dependencies-{{ checksum "requirements.txt" }}
- - run:
- name: lint code
- command: |
- . venv/bin/activate
- flake8 <project package>
- isort --recursive --check-only --diff <project package> -sp tox.ini
- - run:
- name: run tests
- command: |
- . venv/bin/activate
- python manage.py makemigrations --check --dry-run
- coverage run manage.py test
- codecov --token=<your private project token>
- - store_artifacts:
- path: test-reports
- destination: test-reports
- deploy:
- docker:
- - image: buildpack-deps:trusty-scm
- working_directory: ~/repo
- steps:
- - checkout
- - deploy:
- name: Eldarion Cloud
- command: |
- bin/ec/auth.sh
- bin/ec/deploy.sh staging
- bin/ec/slack-notify.sh staging
- workflows:
- version: 2
- test-and-deploy:
- jobs:
- - test
- - deploy:
- requires:
- - test
- filters:
- branches:
- only: master
Add Comment
Please, Sign In to add comment