version: 2
jobs:
  build:
    working_directory: ~/circulate
    docker:
      - image: python:3.6.0
        environment:
          FLASK_CONFIG: testing
          TEST_DATABASE_URL: postgresql://ubuntu@localhost/circle_test?sslmode=disable
      - image: postgres:9.6.2
        environment:
          POSTGRES_USER: ubuntu
          POSTGRES_DB: circle_test
          POSTGRES_PASSWORD: ""
      - image: selenium/standalone-chrome:3.1.0
    steps:
      - checkout
      - restore_cache:
          key: projectname-{{ .Branch }}-{{ checksum "requirements/dev.txt" }}
      - run:
          name: Install Dependencies
          command: pip install -r requirements/dev.txt
      - run:
          # this can be removed
          name: Locate site Packages
          command: python -c "import site; print(site.getsitepackages())"
      - save_cache:
          key: projectname-{{ .Branch }}-{{ checksum "requirements/dev.txt" }}
          paths:
            - "~/.cache/pip"
            - "/usr/local/lib/python3.6/site-packages"
      - run:
          name: Run Tests
          command: python manage.py test
      - store_artifacts:
          path: test-reports/
          destination: tr1
      - store_test_results:
          path: test-reports/
      - run:
          name: setup Heroku
          command: cd .circleci && chmod + x setup-heroku.sh && ./setup-heroku.sh
      - run:
          name: Check
          command: cat ~/.netrc


version: 2
jobs:
  build:
    working_directory: ~/circulate
    docker:
      - image: python:3.6.0
        environment:
          FLASK_CONFIG: testing
          TEST_DATABASE_URL: postgresql://ubuntu@localhost/circle_test?sslmode=disable
      - image: postgres:9.6.2
        environment:
          POSTGRES_USER: ubuntu
          POSTGRES_DB: circle_test
          POSTGRES_PASSWORD: ""
      - image: selenium/standalone-chrome:3.1.0
    steps:
      - checkout
      - restore_cache:
          key: projectname-{{ .Branch }}-{{ checksum "requirements/dev.txt" }}
      - run:
          name: Install Dependencies
          command: pip install -r requirements/dev.txt
      - run:
          # this can be removed
          name: Locate site Packages
          command: python -c "import site; print(site.getsitepackages())"
      - save_cache:
          key: projectname-{{ .Branch }}-{{ checksum "requirements/dev.txt" }}
          paths:
            - "~/.cache/pip"
            - "/usr/local/lib/python3.6/site-packages"
      #- run:
      #    name: Run Tests
      #    command: python manage.py test
      - store_artifacts:
          path: test-reports/
          destination: tr1
      - store_test_results:
          path: test-reports/
      - run:
          name: setup Heroku
          command: cd .circleci && chmod +x setup-heroku.sh && ./setup-heroku.sh
      - run:
          name: Check
          command: cat ~/.netrc


Set up Heroku on CCI10
Set up Heroku on CCI10
