version: 2
jobs:
  build:
    docker:
      - image: circleci/python:3.6.1

    working_directory: ~/repo

    steps:
      - checkout

      - restore_cache:
          key: deps-{{ .Branch }}-{{ checksum "dev-requirements.txt" }}-{{ checksum "setup.py" }}
      - run:
          name: Create Virtual Env
          command: |
            python3 -m venv venv
      - run:
          name: Install dev requirements
          command: |
            . venv/bin/activate
            pip install -r dev-requirements.txt
      - run:
          name: Install Phial
          command: |
            . venv/bin/activate
            pip install -e .
      - save_cache:
          key: deps-{{ .Branch }}-{{ checksum "dev-requirements.txt" }}-{{ checksum "setup.py" }}
          paths:
            - "venv"
      - run:
          name: Lint Code
          command: |
            . venv/bin/activate
            flake8 phial/ tests/
      - run:
          name: Run Tests
          command: |
            . venv/bin/activate
            nosetests --with-coverage --cover-inclusive --cover-package=phial
      - run:
          name: Upload coverage
          command: |
            . venv/bin/activate
            coveralls

version: 2
jobs:
  build:
    docker:
      - image: circleci/python:3.6.1

    working_directory: ~/repo

    steps:
      - checkout

      - restore_cache:
          key: deps-{{ checksum "dev-requirements.txt" }}-{{ checksum "setup.py" }}
      - run:
          name: Create Virtual Env
          command: |
            python3 -m venv venv
      - run:
          name: Install dev requirements
          command: |
            . venv/bin/activate
            pip install -r dev-requirements.txt
      - run:
          name: Install Phial
          command: |
            . venv/bin/activate
            pip install -e .
      - save_cache:
          key: deps-{{ checksum "dev-requirements.txt" }}-{{ checksum "setup.py" }}
          paths:
            - "venv"
      - run:
          name: Lint Code
          command: |
            . venv/bin/activate
            flake8 phial/ tests/
      - run:
          name: Run Tests
          command: |
            . venv/bin/activate
            nosetests --with-coverage --cover-inclusive --cover-package=phial
      - run:
          name: Upload coverage
          command: |
            . venv/bin/activate
            coveralls

Change ci to not cache per branch
Change ci to not cache per branch
